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
@@ -72,7 +72,7 @@ static void __init at91sam9_dt_device_init(void)
|
||||
at91sam9260_pm_init();
|
||||
}
|
||||
|
||||
static const char *at91_dt_board_compat[] __initconst = {
|
||||
static const char *const at91_dt_board_compat[] __initconst = {
|
||||
"atmel,at91sam9",
|
||||
NULL
|
||||
};
|
||||
@@ -89,7 +89,7 @@ static void __init at91sam9g45_dt_device_init(void)
|
||||
at91sam9g45_pm_init();
|
||||
}
|
||||
|
||||
static const char *at91sam9g45_board_compat[] __initconst = {
|
||||
static const char *const at91sam9g45_board_compat[] __initconst = {
|
||||
"atmel,at91sam9g45",
|
||||
NULL
|
||||
};
|
||||
@@ -106,7 +106,7 @@ static void __init at91sam9x5_dt_device_init(void)
|
||||
at91sam9x5_pm_init();
|
||||
}
|
||||
|
||||
static const char *at91sam9x5_board_compat[] __initconst = {
|
||||
static const char *const at91sam9x5_board_compat[] __initconst = {
|
||||
"atmel,at91sam9x5",
|
||||
"atmel,at91sam9n12",
|
||||
NULL
|
||||
|
Reference in New Issue
Block a user