ARM: ux500: cpuidle: fix section mismatch
PATCH 1/1 ARM: ux500: cpuidle: fix section mismatch
The dbx500_cpuidle_probe is tagged as an __init section but the variable dbx500_cpuidle_plat_driver is not.
The dbx500_cpuidle_probe could not be declared as __init because of macro module_platform_driver builds the exit function, tags as __exit and this one refers to the dbx500_cpuidle_plat_driver which is an __initdata.
That leads to a section mismatch.
Fix it by removing the __init tag for the probe function.
--- drivers/cpuidle/cpuidle-ux500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpuidle/cpuidle-ux500.c +1 -1
@@ -111,7 +111,7 @@ static struct cpuidle_driver ux500_idle_driver = { .state_count = 2, }; -static int __init dbx500_cpuidle_probe (struct platform_device *pdev) +static int dbx500_cpuidle_probe (struct platform_device *pdev) {/* Configure wake up reasons */ prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) |
Signature · 1 line
1.7.9.5
PATCH 1/1 ARM: ux500: cpuidle: fix section mismatch
Quoted 7 lines · Daniel Lezcano
The
dbx500_cpuidle_probeis tagged as an__initsection but the variabledbx500_cpuidle_plat_driveris not.The
dbx500_cpuidle_probecould not be declared as__initbecause of macromodule_platform_driverbuilds the exit function, tags as__exitand this one refers to thedbx500_cpuidle_plat_driverwhich is an__initdata.
Quoted 5 lines
That leads to a section mismatch.
Fix it by removing the
__inittag for the probe function.Signed-off-by Daniel Lezcano <[email protected]>
Sorry if I caused this and thanks for fixing it up!
Yours,
Linus Walleij