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
@@ -44,7 +44,7 @@ static void __init bcm5301x_init_early(void)
|
||||
"imprecise external abort");
|
||||
}
|
||||
|
||||
static const char __initconst *bcm5301x_dt_compat[] = {
|
||||
static const char *const bcm5301x_dt_compat[] __initconst = {
|
||||
"brcm,bcm4708",
|
||||
NULL,
|
||||
};
|
||||
|
@@ -33,7 +33,7 @@ struct bcm_kona_smc_data {
|
||||
unsigned result;
|
||||
};
|
||||
|
||||
static const struct of_device_id bcm_kona_smc_ids[] __initconst = {
|
||||
static const struct of_device_id const bcm_kona_smc_ids[] __initconst = {
|
||||
{.compatible = "brcm,kona-smc"},
|
||||
{.compatible = "bcm,kona-smc"}, /* deprecated name */
|
||||
{},
|
||||
|
Reference in New Issue
Block a user