mfd: twl-core: Fix section annotations on {,un}protect_pm_master
authorNathan Chancellor <natechancellor@gmail.com>
Wed, 17 Oct 2018 17:13:23 +0000 (10:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Feb 2019 09:06:58 +0000 (10:06 +0100)
commitc42ae90ce5ee137854ab8445bbdddc4642d9e79c
tree6f3ad921560353e8bd8106621cbc35a50b685b21
parentfcbdbda22d97b8b7a4dd140776f573e3a1ffaec4
mfd: twl-core: Fix section annotations on {,un}protect_pm_master

[ Upstream commit 8838555089f0345b87f4277fe5a8dd647dc65589 ]

When building the kernel with Clang, the following section mismatch
warning appears:

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

Remove the __init annotation on the *protect_pm_master functions so
there is no more mismatch.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/twl-core.c