ARM: appropriate __init annotation for const data
Init data marked const should be annotated with __initconst for correctness and not __initdata. In some cases the array gathering references to that data has to be marked const as well. This fixes LTO builds that otherwise fail with section mismatch errors. Signed-off-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:

committed by
Olof Johansson

parent
a115681460
commit
19c233b79d
@@ -212,7 +212,7 @@ static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = {
|
||||
.dma_filter = pl08x_filter_id,
|
||||
};
|
||||
|
||||
static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = {
|
||||
static const struct of_dev_auxdata const lpc32xx_auxdata_lookup[] __initconst = {
|
||||
OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL),
|
||||
OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL),
|
||||
OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data),
|
||||
@@ -248,7 +248,7 @@ static void __init lpc3250_machine_init(void)
|
||||
lpc32xx_auxdata_lookup, NULL);
|
||||
}
|
||||
|
||||
static char const *lpc32xx_dt_compat[] __initdata = {
|
||||
static const char *const lpc32xx_dt_compat[] __initconst = {
|
||||
"nxp,lpc3220",
|
||||
"nxp,lpc3230",
|
||||
"nxp,lpc3240",
|
||||
|
Reference in New Issue
Block a user