Commit 56c118a7 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Luis Henriques

ARM: pxa: remove incorrect __init annotation on pxa27x_set_pwrmode

commit 54c09889 upstream.

The z2 machine calls pxa27x_set_pwrmode() in order to power off
the machine, but this function gets discarded early at boot because
it is marked __init, as pointed out by kbuild:

WARNING: vmlinux.o(.text+0x145c4): Section mismatch in reference from the function z2_power_off() to the function .init.text:pxa27x_set_pwrmode()
The function z2_power_off() references
the function __init pxa27x_set_pwrmode().
This is often because z2_power_off lacks a __init
annotation or the annotation of pxa27x_set_pwrmode is wrong.

This removes the __init section modifier to fix rebooting and the
build error.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: ba4a90a6 ("ARM: pxa/z2: fix building error of pxa27x_cpu_suspend() no longer available")
Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent ae5595f9
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
extern void __init pxa27x_map_io(void); extern void __init pxa27x_map_io(void);
extern void __init pxa27x_init_irq(void); extern void __init pxa27x_init_irq(void);
extern int __init pxa27x_set_pwrmode(unsigned int mode); extern int pxa27x_set_pwrmode(unsigned int mode);
extern void pxa27x_cpu_pm_enter(suspend_state_t state); extern void pxa27x_cpu_pm_enter(suspend_state_t state);
#define pxa27x_handle_irq ichp_handle_irq #define pxa27x_handle_irq ichp_handle_irq
......
...@@ -251,7 +251,7 @@ static struct clk_lookup pxa27x_clkregs[] = { ...@@ -251,7 +251,7 @@ static struct clk_lookup pxa27x_clkregs[] = {
*/ */
static unsigned int pwrmode = PWRMODE_SLEEP; static unsigned int pwrmode = PWRMODE_SLEEP;
int __init pxa27x_set_pwrmode(unsigned int mode) int pxa27x_set_pwrmode(unsigned int mode)
{ {
switch (mode) { switch (mode) {
case PWRMODE_SLEEP: case PWRMODE_SLEEP:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment