ARM: at91: pm: keep at91_pm_backup_init() only for SAMA5D2 SoCs
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Thu, 14 Feb 2019 15:54:47 +0000 (15:54 +0000)
committerLudovic Desroches <ludovic.desroches@microchip.com>
Thu, 28 Mar 2019 10:05:53 +0000 (11:05 +0100)
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>
arch/arm/mach-at91/pm.c

index e42db02eafe4202993745fc92c21fd6f850a667a..c83f78000ab35f1a229357443e6d3b9550dad00d 100644 (file)
@@ -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;