tty: constify of_device_id array
authorFabian Frederick <fabf@skynet.be>
Mon, 16 Mar 2015 19:17:11 +0000 (20:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 21:49:10 +0000 (22:49 +0100)
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Peter Korsgaard <peter@korsgaard.com>
Acked-by: Timur Tabi <timur@tabi.org>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 files changed:
drivers/tty/serial/apbuart.c
drivers/tty/serial/cpm_uart/cpm_uart_core.c
drivers/tty/serial/fsl_lpuart.c
drivers/tty/serial/mpc52xx_uart.c
drivers/tty/serial/mxs-auart.c
drivers/tty/serial/of_serial.c
drivers/tty/serial/pmac_zilog.c
drivers/tty/serial/pxa.c
drivers/tty/serial/serial-tegra.c
drivers/tty/serial/sirfsoc_uart.c
drivers/tty/serial/st-asc.c
drivers/tty/serial/uartlite.c
drivers/tty/serial/ucc_uart.c
drivers/tty/serial/xilinx_uartps.c

index 4f0f95e358e8300aed111f4bab22f7abec8d6c9a..f3af317131acb022616739800cca755c29ebf404 100644 (file)
@@ -572,7 +572,7 @@ static int apbuart_probe(struct platform_device *op)
        return 0;
 }
 
-static struct of_device_id apbuart_match[] = {
+static const struct of_device_id apbuart_match[] = {
        {
         .name = "GAISLER_APBUART",
         },
index fddb1fd4d9d3347d2ef790e1e796d7338ba1b385..08431adeacd5dcd4f24e4ba395a228eab1060457 100644 (file)
@@ -1435,7 +1435,7 @@ static int cpm_uart_remove(struct platform_device *ofdev)
        return uart_remove_one_port(&cpm_reg, &pinfo->port);
 }
 
-static struct of_device_id cpm_uart_match[] = {
+static const struct of_device_id cpm_uart_match[] = {
        {
                .compatible = "fsl,cpm1-smc-uart",
        },
index b1893f3f88f1c6b6fdb2e8e42ad565ba23e18fd1..946273a0dec40fdb410777d8681ff1ab925731c7 100644 (file)
@@ -257,7 +257,7 @@ struct lpuart_port {
        struct timer_list       lpuart_timer;
 };
 
-static struct of_device_id lpuart_dt_ids[] = {
+static const struct of_device_id lpuart_dt_ids[] = {
        {
                .compatible = "fsl,vf610-lpuart",
        },
index 3308ef243dc31ab03a88d2dbdc41d8faa057cb9d..1589f17c1fca61dd63682041bba0d9f7e2330e35 100644 (file)
@@ -1717,7 +1717,7 @@ static struct uart_driver mpc52xx_uart_driver = {
 /* OF Platform Driver                                                       */
 /* ======================================================================== */
 
-static struct of_device_id mpc52xx_uart_of_match[] = {
+static const struct of_device_id mpc52xx_uart_of_match[] = {
 #ifdef CONFIG_PPC_MPC52xx
        { .compatible = "fsl,mpc5200b-psc-uart", .data = &mpc5200b_psc_ops, },
        { .compatible = "fsl,mpc5200-psc-uart", .data = &mpc52xx_psc_ops, },
index 20a863bde78de3c9a1d07b29f158ff6e04ae7dc6..f7e5825b55ab32f339ee7e7d4d430cc3468cb571 100644 (file)
@@ -176,7 +176,7 @@ static struct platform_device_id mxs_auart_devtype[] = {
 };
 MODULE_DEVICE_TABLE(platform, mxs_auart_devtype);
 
-static struct of_device_id mxs_auart_dt_ids[] = {
+static const struct of_device_id mxs_auart_dt_ids[] = {
        {
                .compatible = "fsl,imx28-auart",
                .data = &mxs_auart_devtype[IMX28_AUART]
index 33fb94f7896773c53141ec283f15a3a18be96f1a..d8c4eea23b7cdde3024daf7bb540b178e58b3bfe 100644 (file)
@@ -155,7 +155,7 @@ out:
 /*
  * Try to register a serial port
  */
-static struct of_device_id of_platform_serial_table[];
+static const struct of_device_id of_platform_serial_table[];
 static int of_platform_serial_probe(struct platform_device *ofdev)
 {
        const struct of_device_id *match;
@@ -320,7 +320,7 @@ static SIMPLE_DEV_PM_OPS(of_serial_pm_ops, of_serial_suspend, of_serial_resume);
 /*
  * A few common types, add more as needed.
  */
-static struct of_device_id of_platform_serial_table[] = {
+static const struct of_device_id of_platform_serial_table[] = {
        { .compatible = "ns8250",   .data = (void *)PORT_8250, },
        { .compatible = "ns16450",  .data = (void *)PORT_16450, },
        { .compatible = "ns16550a", .data = (void *)PORT_16550A, },
index 8f515799c9c10a27add45b156425bf98ae920deb..e156e39d620cebd2ee48304ed80223fd7c96a2c2 100644 (file)
@@ -1846,7 +1846,7 @@ static int __init pmz_register(void)
 
 #ifdef CONFIG_PPC_PMAC
 
-static struct of_device_id pmz_match[] = 
+static const struct of_device_id pmz_match[] =
 {
        {
        .name           = "ch-a",
index d5d062694bd399e8d82e9811a9667f3b439e372f..9becba6548921116adae390af002290cb31e883a 100644 (file)
@@ -824,7 +824,7 @@ static const struct dev_pm_ops serial_pxa_pm_ops = {
 };
 #endif
 
-static struct of_device_id serial_pxa_dt_ids[] = {
+static const struct of_device_id serial_pxa_dt_ids[] = {
        { .compatible = "mrvl,pxa-uart", },
        { .compatible = "mrvl,mmp-uart", },
        {}
index 48e6e41636b2040c9a02a3f610d6d4610ae13fe3..1d5ea3964ee59d61d882ad23e35f63e367e86af5 100644 (file)
@@ -1251,7 +1251,7 @@ static struct tegra_uart_chip_data tegra30_uart_chip_data = {
        .support_clk_src_div            = true,
 };
 
-static struct of_device_id tegra_uart_of_match[] = {
+static const struct of_device_id tegra_uart_of_match[] = {
        {
                .compatible     = "nvidia,tegra30-hsuart",
                .data           = &tegra30_uart_chip_data,
index 27ed0e960880990c810fe4190e28f03dd455db4f..9de3eabe57372c49322e45034c99a3de99b59ae9 100644 (file)
@@ -1269,7 +1269,7 @@ static struct uart_driver sirfsoc_uart_drv = {
 #endif
 };
 
-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},
index 712b03a076b8c1ca5ee9e2bdfad3752eccdd7155..d625664ce1b51eea836775d800eded58140fb5ee 100644 (file)
@@ -720,7 +720,7 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_OF
-static struct of_device_id asc_match[] = {
+static const struct of_device_id asc_match[] = {
        { .compatible = "st,asc", },
        {},
 };
index 189f52e3111ff71feef99741f1ad52e680c42f4b..708eead850b032bdc74c17031c66b0d58abb192a 100644 (file)
@@ -622,7 +622,7 @@ static int ulite_release(struct device *dev)
 
 #if defined(CONFIG_OF)
 /* Match table for of_platform binding */
-static struct of_device_id ulite_of_match[] = {
+static const struct of_device_id ulite_of_match[] = {
        { .compatible = "xlnx,opb-uartlite-1.00.b", },
        { .compatible = "xlnx,xps-uartlite-1.00.a", },
        {}
index 14d10fcfd21052798e73a2ee5746b2ff347d1bbb..7d2532b23969e738cc63f9c952ff737a18b2abea 100644 (file)
@@ -1473,7 +1473,7 @@ static int ucc_uart_remove(struct platform_device *ofdev)
        return 0;
 }
 
-static struct of_device_id ucc_uart_match[] = {
+static const struct of_device_id ucc_uart_match[] = {
        {
                .type = "serial",
                .compatible = "ucc_uart",
index 8f9c5430f4706df7890327ca3cd31041c629ebaa..09258de6947ea89c8e762900d244d35a490a3dd4 100644 (file)
@@ -1459,7 +1459,7 @@ static int cdns_uart_remove(struct platform_device *pdev)
 }
 
 /* Match table for of_platform binding */
-static struct of_device_id cdns_uart_of_match[] = {
+static const struct of_device_id cdns_uart_of_match[] = {
        { .compatible = "xlnx,xuartps", },
        { .compatible = "cdns,uart-r1p8", },
        {}