serial: sirf: make of_device_ids const
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 15 Jun 2017 11:38:40 +0000 (17:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jun 2017 02:24:15 +0000 (10:24 +0800)
of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sirfsoc_uart.c

index e03282d92b5997c0caece212114550d3fadb82c1..684cb8dd8050b189316fc8ddcdc03c9fa20422db 100644 (file)
@@ -1253,7 +1253,7 @@ next_hrt:
        return HRTIMER_RESTART;
 }
 
-static struct of_device_id sirfsoc_uart_ids[] = {
+static const struct of_device_id sirfsoc_uart_ids[] = {
        { .compatible = "sirf,prima2-uart", .data = &sirfsoc_uart,},
        { .compatible = "sirf,atlas7-uart", .data = &sirfsoc_uart},
        { .compatible = "sirf,prima2-usp-uart", .data = &sirfsoc_usp},