diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-03-16 15:17:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 17:49:10 -0400 |
commit | ed0bb2323c9321b91dfa0ea8317fdc4d9592dce4 (patch) | |
tree | 2dfa6c5e00026501e022cb089fa5716bd0a5741a | |
parent | 37ff5252b3ae141eba2dcf20693484e4b53176b1 (diff) |
tty: constify of_device_id array
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>
-rw-r--r-- | drivers/tty/serial/apbuart.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/mpc52xx_uart.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/mxs-auart.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/of_serial.c | 4 | ||||
-rw-r--r-- | drivers/tty/serial/pmac_zilog.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/pxa.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/serial-tegra.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/sirfsoc_uart.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/st-asc.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/uartlite.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/ucc_uart.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 2 |
14 files changed, 15 insertions, 15 deletions
diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c index 4f0f95e358e8..f3af317131ac 100644 --- a/drivers/tty/serial/apbuart.c +++ b/drivers/tty/serial/apbuart.c | |||
@@ -572,7 +572,7 @@ static int apbuart_probe(struct platform_device *op) | |||
572 | return 0; | 572 | return 0; |
573 | } | 573 | } |
574 | 574 | ||
575 | static struct of_device_id apbuart_match[] = { | 575 | static const struct of_device_id apbuart_match[] = { |
576 | { | 576 | { |
577 | .name = "GAISLER_APBUART", | 577 | .name = "GAISLER_APBUART", |
578 | }, | 578 | }, |
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c index fddb1fd4d9d3..08431adeacd5 100644 --- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c | |||
@@ -1435,7 +1435,7 @@ static int cpm_uart_remove(struct platform_device *ofdev) | |||
1435 | return uart_remove_one_port(&cpm_reg, &pinfo->port); | 1435 | return uart_remove_one_port(&cpm_reg, &pinfo->port); |
1436 | } | 1436 | } |
1437 | 1437 | ||
1438 | static struct of_device_id cpm_uart_match[] = { | 1438 | static const struct of_device_id cpm_uart_match[] = { |
1439 | { | 1439 | { |
1440 | .compatible = "fsl,cpm1-smc-uart", | 1440 | .compatible = "fsl,cpm1-smc-uart", |
1441 | }, | 1441 | }, |
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index b1893f3f88f1..946273a0dec4 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c | |||
@@ -257,7 +257,7 @@ struct lpuart_port { | |||
257 | struct timer_list lpuart_timer; | 257 | struct timer_list lpuart_timer; |
258 | }; | 258 | }; |
259 | 259 | ||
260 | static struct of_device_id lpuart_dt_ids[] = { | 260 | static const struct of_device_id lpuart_dt_ids[] = { |
261 | { | 261 | { |
262 | .compatible = "fsl,vf610-lpuart", | 262 | .compatible = "fsl,vf610-lpuart", |
263 | }, | 263 | }, |
diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c index 3308ef243dc3..1589f17c1fca 100644 --- a/drivers/tty/serial/mpc52xx_uart.c +++ b/drivers/tty/serial/mpc52xx_uart.c | |||
@@ -1717,7 +1717,7 @@ static struct uart_driver mpc52xx_uart_driver = { | |||
1717 | /* OF Platform Driver */ | 1717 | /* OF Platform Driver */ |
1718 | /* ======================================================================== */ | 1718 | /* ======================================================================== */ |
1719 | 1719 | ||
1720 | static struct of_device_id mpc52xx_uart_of_match[] = { | 1720 | static const struct of_device_id mpc52xx_uart_of_match[] = { |
1721 | #ifdef CONFIG_PPC_MPC52xx | 1721 | #ifdef CONFIG_PPC_MPC52xx |
1722 | { .compatible = "fsl,mpc5200b-psc-uart", .data = &mpc5200b_psc_ops, }, | 1722 | { .compatible = "fsl,mpc5200b-psc-uart", .data = &mpc5200b_psc_ops, }, |
1723 | { .compatible = "fsl,mpc5200-psc-uart", .data = &mpc52xx_psc_ops, }, | 1723 | { .compatible = "fsl,mpc5200-psc-uart", .data = &mpc52xx_psc_ops, }, |
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 20a863bde78d..f7e5825b55ab 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c | |||
@@ -176,7 +176,7 @@ static struct platform_device_id mxs_auart_devtype[] = { | |||
176 | }; | 176 | }; |
177 | MODULE_DEVICE_TABLE(platform, mxs_auart_devtype); | 177 | MODULE_DEVICE_TABLE(platform, mxs_auart_devtype); |
178 | 178 | ||
179 | static struct of_device_id mxs_auart_dt_ids[] = { | 179 | static const struct of_device_id mxs_auart_dt_ids[] = { |
180 | { | 180 | { |
181 | .compatible = "fsl,imx28-auart", | 181 | .compatible = "fsl,imx28-auart", |
182 | .data = &mxs_auart_devtype[IMX28_AUART] | 182 | .data = &mxs_auart_devtype[IMX28_AUART] |
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index 33fb94f78967..d8c4eea23b7c 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c | |||
@@ -155,7 +155,7 @@ out: | |||
155 | /* | 155 | /* |
156 | * Try to register a serial port | 156 | * Try to register a serial port |
157 | */ | 157 | */ |
158 | static struct of_device_id of_platform_serial_table[]; | 158 | static const struct of_device_id of_platform_serial_table[]; |
159 | static int of_platform_serial_probe(struct platform_device *ofdev) | 159 | static int of_platform_serial_probe(struct platform_device *ofdev) |
160 | { | 160 | { |
161 | const struct of_device_id *match; | 161 | 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); | |||
320 | /* | 320 | /* |
321 | * A few common types, add more as needed. | 321 | * A few common types, add more as needed. |
322 | */ | 322 | */ |
323 | static struct of_device_id of_platform_serial_table[] = { | 323 | static const struct of_device_id of_platform_serial_table[] = { |
324 | { .compatible = "ns8250", .data = (void *)PORT_8250, }, | 324 | { .compatible = "ns8250", .data = (void *)PORT_8250, }, |
325 | { .compatible = "ns16450", .data = (void *)PORT_16450, }, | 325 | { .compatible = "ns16450", .data = (void *)PORT_16450, }, |
326 | { .compatible = "ns16550a", .data = (void *)PORT_16550A, }, | 326 | { .compatible = "ns16550a", .data = (void *)PORT_16550A, }, |
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 8f515799c9c1..e156e39d620c 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c | |||
@@ -1846,7 +1846,7 @@ static int __init pmz_register(void) | |||
1846 | 1846 | ||
1847 | #ifdef CONFIG_PPC_PMAC | 1847 | #ifdef CONFIG_PPC_PMAC |
1848 | 1848 | ||
1849 | static struct of_device_id pmz_match[] = | 1849 | static const struct of_device_id pmz_match[] = |
1850 | { | 1850 | { |
1851 | { | 1851 | { |
1852 | .name = "ch-a", | 1852 | .name = "ch-a", |
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c index d5d062694bd3..9becba654892 100644 --- a/drivers/tty/serial/pxa.c +++ b/drivers/tty/serial/pxa.c | |||
@@ -824,7 +824,7 @@ static const struct dev_pm_ops serial_pxa_pm_ops = { | |||
824 | }; | 824 | }; |
825 | #endif | 825 | #endif |
826 | 826 | ||
827 | static struct of_device_id serial_pxa_dt_ids[] = { | 827 | static const struct of_device_id serial_pxa_dt_ids[] = { |
828 | { .compatible = "mrvl,pxa-uart", }, | 828 | { .compatible = "mrvl,pxa-uart", }, |
829 | { .compatible = "mrvl,mmp-uart", }, | 829 | { .compatible = "mrvl,mmp-uart", }, |
830 | {} | 830 | {} |
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c index 48e6e41636b2..1d5ea3964ee5 100644 --- a/drivers/tty/serial/serial-tegra.c +++ b/drivers/tty/serial/serial-tegra.c | |||
@@ -1251,7 +1251,7 @@ static struct tegra_uart_chip_data tegra30_uart_chip_data = { | |||
1251 | .support_clk_src_div = true, | 1251 | .support_clk_src_div = true, |
1252 | }; | 1252 | }; |
1253 | 1253 | ||
1254 | static struct of_device_id tegra_uart_of_match[] = { | 1254 | static const struct of_device_id tegra_uart_of_match[] = { |
1255 | { | 1255 | { |
1256 | .compatible = "nvidia,tegra30-hsuart", | 1256 | .compatible = "nvidia,tegra30-hsuart", |
1257 | .data = &tegra30_uart_chip_data, | 1257 | .data = &tegra30_uart_chip_data, |
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c index 27ed0e960880..9de3eabe5737 100644 --- a/drivers/tty/serial/sirfsoc_uart.c +++ b/drivers/tty/serial/sirfsoc_uart.c | |||
@@ -1269,7 +1269,7 @@ static struct uart_driver sirfsoc_uart_drv = { | |||
1269 | #endif | 1269 | #endif |
1270 | }; | 1270 | }; |
1271 | 1271 | ||
1272 | static struct of_device_id sirfsoc_uart_ids[] = { | 1272 | static const struct of_device_id sirfsoc_uart_ids[] = { |
1273 | { .compatible = "sirf,prima2-uart", .data = &sirfsoc_uart,}, | 1273 | { .compatible = "sirf,prima2-uart", .data = &sirfsoc_uart,}, |
1274 | { .compatible = "sirf,atlas7-uart", .data = &sirfsoc_uart}, | 1274 | { .compatible = "sirf,atlas7-uart", .data = &sirfsoc_uart}, |
1275 | { .compatible = "sirf,prima2-usp-uart", .data = &sirfsoc_usp}, | 1275 | { .compatible = "sirf,prima2-usp-uart", .data = &sirfsoc_usp}, |
diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index 712b03a076b8..d625664ce1b5 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c | |||
@@ -720,7 +720,7 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev) | |||
720 | } | 720 | } |
721 | 721 | ||
722 | #ifdef CONFIG_OF | 722 | #ifdef CONFIG_OF |
723 | static struct of_device_id asc_match[] = { | 723 | static const struct of_device_id asc_match[] = { |
724 | { .compatible = "st,asc", }, | 724 | { .compatible = "st,asc", }, |
725 | {}, | 725 | {}, |
726 | }; | 726 | }; |
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c index 189f52e3111f..708eead850b0 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c | |||
@@ -622,7 +622,7 @@ static int ulite_release(struct device *dev) | |||
622 | 622 | ||
623 | #if defined(CONFIG_OF) | 623 | #if defined(CONFIG_OF) |
624 | /* Match table for of_platform binding */ | 624 | /* Match table for of_platform binding */ |
625 | static struct of_device_id ulite_of_match[] = { | 625 | static const struct of_device_id ulite_of_match[] = { |
626 | { .compatible = "xlnx,opb-uartlite-1.00.b", }, | 626 | { .compatible = "xlnx,opb-uartlite-1.00.b", }, |
627 | { .compatible = "xlnx,xps-uartlite-1.00.a", }, | 627 | { .compatible = "xlnx,xps-uartlite-1.00.a", }, |
628 | {} | 628 | {} |
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index 14d10fcfd210..7d2532b23969 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c | |||
@@ -1473,7 +1473,7 @@ static int ucc_uart_remove(struct platform_device *ofdev) | |||
1473 | return 0; | 1473 | return 0; |
1474 | } | 1474 | } |
1475 | 1475 | ||
1476 | static struct of_device_id ucc_uart_match[] = { | 1476 | static const struct of_device_id ucc_uart_match[] = { |
1477 | { | 1477 | { |
1478 | .type = "serial", | 1478 | .type = "serial", |
1479 | .compatible = "ucc_uart", | 1479 | .compatible = "ucc_uart", |
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 8f9c5430f470..09258de6947e 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c | |||
@@ -1459,7 +1459,7 @@ static int cdns_uart_remove(struct platform_device *pdev) | |||
1459 | } | 1459 | } |
1460 | 1460 | ||
1461 | /* Match table for of_platform binding */ | 1461 | /* Match table for of_platform binding */ |
1462 | static struct of_device_id cdns_uart_of_match[] = { | 1462 | static const struct of_device_id cdns_uart_of_match[] = { |
1463 | { .compatible = "xlnx,xuartps", }, | 1463 | { .compatible = "xlnx,xuartps", }, |
1464 | { .compatible = "cdns,uart-r1p8", }, | 1464 | { .compatible = "cdns,uart-r1p8", }, |
1465 | {} | 1465 | {} |