]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ARM: pxa: remove incorrect __init annotation on pxa27x_set_pwrmode
authorArnd Bergmann <arnd@arndb.de>
Mon, 12 Oct 2015 13:46:08 +0000 (15:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:31:09 +0000 (14:31 -0500)
commit1c04b0f02aba857f1624c5d01d0b8e3ec9757fd0
tree0ddda191e7c3344058bdb134de051a37bbd9f23d
parentcc372ce4aa1aabfb95daa6063da16b452b8e98f7
ARM: pxa: remove incorrect __init annotation on pxa27x_set_pwrmode

commit 54c09889bff6d99c8733eed4a26c9391b177c88b 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: Arnd Bergmann <arnd@arndb.de>
Fixes: ba4a90a6d86a ("ARM: pxa/z2: fix building error of pxa27x_cpu_suspend() no longer available")
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mach-pxa/include/mach/pxa27x.h
arch/arm/mach-pxa/pxa27x.c