summaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea@microchip.com>2019-02-14 18:54:47 +0300
committerLudovic Desroches <ludovic.desroches@microchip.com>2019-03-28 13:05:53 +0300
commit2fa86e5200a49b3f236a0835f3976c3148148206 (patch)
tree09ec66cd023feb5f96c9aeec5cb5c834db8f42e2 /arch/arm/mach-at91
parent01c7031cfa7308c2a6d46636bda2e51be6474cf4 (diff)
downloadlinux-2fa86e5200a49b3f236a0835f3976c3148148206.tar.xz
ARM: at91: pm: keep at91_pm_backup_init() only for SAMA5D2 SoCs
In at91_pm_backup_init() return if it is not about SAMA5D2 SoCs. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/pm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index e42db02eafe4..c83f78000ab3 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -588,6 +588,9 @@ static int __init at91_pm_backup_init(void)
struct platform_device *pdev = NULL;
int ret = -ENODEV;
+ if (!IS_ENABLED(CONFIG_SOC_SAMA5D2))
+ return -EPERM;
+
if (!at91_is_pm_mode_active(AT91_PM_BACKUP))
return 0;