From: Fabio Estevam <festevam@denx.de>
Date: Wed, 22 Jun 2022 11:48:10 +0000 (-0300)
Subject: ARM: at91: pm: Mark at91_pm_secure_init as __init
X-Git-Tag: howlett/maple/20220816~428^2~6^2
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=91d60e259c0f58c855f88f3fe5b7909aec563525;p=users%2Fjedix%2Flinux-maple.git

ARM: at91: pm: Mark at91_pm_secure_init as __init

at91_pm_secure_init() is used inside sama5d2_pm_init(), which has
the __init notation.

Pass the __init notation to at91_pm_secure_init() as well to fix the
following section mismatch warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x2138): Section mismatch in reference from the function at91_pm_secure_init() to the (unknown reference) .init.rodata:(unknown)

Fixes: f2f5cf78a333 ("ARM: at91: pm: add support for sama5d2 secure suspend")
Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220622114810.1186330-1-festevam@gmail.com
---

diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 826fd56d2a17..df6d673e83d5 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -1079,7 +1079,7 @@ securam_fail:
 	return ret;
 }
 
-static void at91_pm_secure_init(void)
+static void __init at91_pm_secure_init(void)
 {
 	int suspend_mode;
 	struct arm_smccc_res res;