Message ID | 1387884527-6067-1-git-send-email-julien.grall@linaro.org |
---|---|
State | Accepted, archived |
Headers | show |
On Tue, 2013-12-24 at 11:28 +0000, Julien Grall wrote: > The data type for DT compatible list should be: > const char * const[] __initconst > > Fix every serial drivers which support device tree. > > Spotted-by: Jan Beulich <jbeulich@suse.com> > Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> WRT the release I think this is a bug fix.
On Mon, 2014-01-06 at 15:05 +0000, Ian Campbell wrote: > On Tue, 2013-12-24 at 11:28 +0000, Julien Grall wrote: > > The data type for DT compatible list should be: > > const char * const[] __initconst > > > > Fix every serial drivers which support device tree. > > > > Spotted-by: Jan Beulich <jbeulich@suse.com> > > Signed-off-by: Julien Grall <julien.grall@linaro.org> > > Acked-by: Ian Campbell <ian.campbell@citrix.com> > > WRT the release I think this is a bug fix. The risk here is a build error which will be easily detected, this patterns of const is used in all the existing non-serial DT drivers so I think we can be pretty confident in it. Applied.
diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c index 17ba010..74ac33d 100644 --- a/xen/drivers/char/exynos4210-uart.c +++ b/xen/drivers/char/exynos4210-uart.c @@ -358,7 +358,7 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev, return 0; } -static const char const *exynos4210_dt_compat[] __initdata = +static const char * const exynos4210_dt_compat[] __initconst = { "samsung,exynos4210-uart", NULL diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 9c2cded..d53caa5 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -814,7 +814,7 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev, return 0; } -static const char const *ns16550_dt_compat[] __initconst = +static const char * const ns16550_dt_compat[] __initconst = { "ns16550", "snps,dw-apb-uart", diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c index ad5aabb..7f21f1f 100644 --- a/xen/drivers/char/omap-uart.c +++ b/xen/drivers/char/omap-uart.c @@ -353,7 +353,7 @@ static int __init omap_uart_init(struct dt_device_node *dev, return 0; } -static const char * const omap_uart_dt_compat[] __initdata = +static const char * const omap_uart_dt_compat[] __initconst = { "ti,omap4-uart", NULL diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c index 378d37e..9c2870a 100644 --- a/xen/drivers/char/pl011.c +++ b/xen/drivers/char/pl011.c @@ -276,7 +276,7 @@ static int __init pl011_uart_init(struct dt_device_node *dev, return 0; } -static const char const *pl011_dt_compat[] __initdata = +static const char * const pl011_dt_compat[] __initconst = { "arm,pl011", NULL
The data type for DT compatible list should be: const char * const[] __initconst Fix every serial drivers which support device tree. Spotted-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Julien Grall <julien.grall@linaro.org> --- xen/drivers/char/exynos4210-uart.c | 2 +- xen/drivers/char/ns16550.c | 2 +- xen/drivers/char/omap-uart.c | 2 +- xen/drivers/char/pl011.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)