ARM: pxa: z2: Fix section mismatch
Subsystems (3)
PATCH 1/1 ARM: pxa: z2: Fix section mismatch
The z2_power_off() function calls pxa27x_set_pwrmode(), which is marked __init. z2_power_off() is set up as the power off handler, so will need to stick around after __init data is discarded. Fix this by doing what everyone else does and set the power mode from the board initialization code instead.
Cc Daniel Mack <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Robert Jarzmik <[email protected]>
Signed-off-by Thierry Reding <[email protected]>
--- arch/arm/mach-pxa/z2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-pxa/z2.c +3 -3
@@ -690,11 +690,8 @@ static void z2_power_off(void)*/ PSPR =0x0 ;local_irq_disable (); -pxa27x_set_pwrmode (PWRMODE_DEEPSLEEP ); pxa27x_cpu_pm_enter(PM_SUSPEND_MEM); } -#else -#define z2_power_off NULL#endif /******************************************************************************
@@ -719,7 +716,10 @@ static void __init z2_init(void)z2_keys_init ();z2_pmic_init (); +#ifdef CONFIG_PM +pxa27x_set_pwrmode (PWRMODE_DEEPSLEEP ); pm_power_off = z2_power_off; +#endif }MACHINE_START (ZIPIT2 ,"Zipit Z2" )
Signature · 1 line
2.5.0
PATCH 1/1 ARM: pxa: z2: Fix section mismatch
Quoted 5 lines · Thierry Reding
The
z2_power_off()function callspxa27x_set_pwrmode(), which is marked__init.z2_power_off()is set up as the power off handler, so will need to stick around after__initdata is discarded. Fix this by doing what everyone else does and set the power mode from the board initialization code instead.
Applied to pxa/fixes, thanks.
Cheers.
--
Robert