提交 ed0bb232 编写于 作者: F Fabian Frederick 提交者: Greg Kroah-Hartman

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: NFabian Frederick <fabf@skynet.be>
Acked-by: NPeter Korsgaard <peter@korsgaard.com>
Acked-by: NTimur Tabi <timur@tabi.org>
Acked-by: NPatrice Chotard <patrice.chotard@st.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 37ff5252
...@@ -572,7 +572,7 @@ static int apbuart_probe(struct platform_device *op) ...@@ -572,7 +572,7 @@ static int apbuart_probe(struct platform_device *op)
return 0; return 0;
} }
static struct of_device_id apbuart_match[] = { static const struct of_device_id apbuart_match[] = {
{ {
.name = "GAISLER_APBUART", .name = "GAISLER_APBUART",
}, },
......
...@@ -1435,7 +1435,7 @@ static int cpm_uart_remove(struct platform_device *ofdev) ...@@ -1435,7 +1435,7 @@ static int cpm_uart_remove(struct platform_device *ofdev)
return uart_remove_one_port(&cpm_reg, &pinfo->port); 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", .compatible = "fsl,cpm1-smc-uart",
}, },
......
...@@ -257,7 +257,7 @@ struct lpuart_port { ...@@ -257,7 +257,7 @@ struct lpuart_port {
struct timer_list lpuart_timer; 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", .compatible = "fsl,vf610-lpuart",
}, },
......
...@@ -1717,7 +1717,7 @@ static struct uart_driver mpc52xx_uart_driver = { ...@@ -1717,7 +1717,7 @@ static struct uart_driver mpc52xx_uart_driver = {
/* OF Platform 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 #ifdef CONFIG_PPC_MPC52xx
{ .compatible = "fsl,mpc5200b-psc-uart", .data = &mpc5200b_psc_ops, }, { .compatible = "fsl,mpc5200b-psc-uart", .data = &mpc5200b_psc_ops, },
{ .compatible = "fsl,mpc5200-psc-uart", .data = &mpc52xx_psc_ops, }, { .compatible = "fsl,mpc5200-psc-uart", .data = &mpc52xx_psc_ops, },
......
...@@ -176,7 +176,7 @@ static struct platform_device_id mxs_auart_devtype[] = { ...@@ -176,7 +176,7 @@ static struct platform_device_id mxs_auart_devtype[] = {
}; };
MODULE_DEVICE_TABLE(platform, 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", .compatible = "fsl,imx28-auart",
.data = &mxs_auart_devtype[IMX28_AUART] .data = &mxs_auart_devtype[IMX28_AUART]
......
...@@ -155,7 +155,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev, ...@@ -155,7 +155,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
/* /*
* Try to register a serial port * 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) static int of_platform_serial_probe(struct platform_device *ofdev)
{ {
const struct of_device_id *match; 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,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. * 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 = "ns8250", .data = (void *)PORT_8250, },
{ .compatible = "ns16450", .data = (void *)PORT_16450, }, { .compatible = "ns16450", .data = (void *)PORT_16450, },
{ .compatible = "ns16550a", .data = (void *)PORT_16550A, }, { .compatible = "ns16550a", .data = (void *)PORT_16550A, },
......
...@@ -1846,7 +1846,7 @@ static int __init pmz_register(void) ...@@ -1846,7 +1846,7 @@ static int __init pmz_register(void)
#ifdef CONFIG_PPC_PMAC #ifdef CONFIG_PPC_PMAC
static struct of_device_id pmz_match[] = static const struct of_device_id pmz_match[] =
{ {
{ {
.name = "ch-a", .name = "ch-a",
......
...@@ -824,7 +824,7 @@ static const struct dev_pm_ops serial_pxa_pm_ops = { ...@@ -824,7 +824,7 @@ static const struct dev_pm_ops serial_pxa_pm_ops = {
}; };
#endif #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,pxa-uart", },
{ .compatible = "mrvl,mmp-uart", }, { .compatible = "mrvl,mmp-uart", },
{} {}
......
...@@ -1251,7 +1251,7 @@ static struct tegra_uart_chip_data tegra30_uart_chip_data = { ...@@ -1251,7 +1251,7 @@ static struct tegra_uart_chip_data tegra30_uart_chip_data = {
.support_clk_src_div = true, .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", .compatible = "nvidia,tegra30-hsuart",
.data = &tegra30_uart_chip_data, .data = &tegra30_uart_chip_data,
......
...@@ -1269,7 +1269,7 @@ static struct uart_driver sirfsoc_uart_drv = { ...@@ -1269,7 +1269,7 @@ static struct uart_driver sirfsoc_uart_drv = {
#endif #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,prima2-uart", .data = &sirfsoc_uart,},
{ .compatible = "sirf,atlas7-uart", .data = &sirfsoc_uart}, { .compatible = "sirf,atlas7-uart", .data = &sirfsoc_uart},
{ .compatible = "sirf,prima2-usp-uart", .data = &sirfsoc_usp}, { .compatible = "sirf,prima2-usp-uart", .data = &sirfsoc_usp},
......
...@@ -720,7 +720,7 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev) ...@@ -720,7 +720,7 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev)
} }
#ifdef CONFIG_OF #ifdef CONFIG_OF
static struct of_device_id asc_match[] = { static const struct of_device_id asc_match[] = {
{ .compatible = "st,asc", }, { .compatible = "st,asc", },
{}, {},
}; };
......
...@@ -622,7 +622,7 @@ static int ulite_release(struct device *dev) ...@@ -622,7 +622,7 @@ static int ulite_release(struct device *dev)
#if defined(CONFIG_OF) #if defined(CONFIG_OF)
/* Match table for of_platform binding */ /* 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,opb-uartlite-1.00.b", },
{ .compatible = "xlnx,xps-uartlite-1.00.a", }, { .compatible = "xlnx,xps-uartlite-1.00.a", },
{} {}
......
...@@ -1473,7 +1473,7 @@ static int ucc_uart_remove(struct platform_device *ofdev) ...@@ -1473,7 +1473,7 @@ static int ucc_uart_remove(struct platform_device *ofdev)
return 0; return 0;
} }
static struct of_device_id ucc_uart_match[] = { static const struct of_device_id ucc_uart_match[] = {
{ {
.type = "serial", .type = "serial",
.compatible = "ucc_uart", .compatible = "ucc_uart",
......
...@@ -1459,7 +1459,7 @@ static int cdns_uart_remove(struct platform_device *pdev) ...@@ -1459,7 +1459,7 @@ static int cdns_uart_remove(struct platform_device *pdev)
} }
/* Match table for of_platform binding */ /* 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 = "xlnx,xuartps", },
{ .compatible = "cdns,uart-r1p8", }, { .compatible = "cdns,uart-r1p8", },
{} {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册