Commit e431914f authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Kleber Sacilotto de Souza

mfd: twl-core: Fix section annotations on {,un}protect_pm_master

BugLink: https://bugs.launchpad.net/bugs/1822271

[ Upstream commit 88385550 ]

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: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarJuerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent b365aca1
...@@ -982,7 +982,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base, ...@@ -982,7 +982,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
* letting it generate the right frequencies for USB, MADC, and * letting it generate the right frequencies for USB, MADC, and
* other purposes. * other purposes.
*/ */
static inline int __init protect_pm_master(void) static inline int protect_pm_master(void)
{ {
int e = 0; int e = 0;
...@@ -991,7 +991,7 @@ static inline int __init protect_pm_master(void) ...@@ -991,7 +991,7 @@ static inline int __init protect_pm_master(void)
return e; return e;
} }
static inline int __init unprotect_pm_master(void) static inline int unprotect_pm_master(void)
{ {
int e = 0; int e = 0;
......
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