ARM: rockchip: make rockchip_suspend_init conditional
authorArnd Bergmann <arnd@arndb.de>
Tue, 27 Jan 2015 20:26:36 +0000 (21:26 +0100)
committerArnd Bergmann <arnd@arndb.de>
Wed, 18 Feb 2015 11:20:28 +0000 (12:20 +0100)
If CONFIG_PM_SLEEP is disabled, we get a build error for rockchips:

arch/arm/mach-rockchip/built-in.o: In function `rockchip_dt_init':
:(.init.text+0x1c): undefined reference to `rockchip_suspend_init'

This adds an inline alternative for that case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org
arch/arm/mach-rockchip/pm.h

index 7d752ff39f91f4a7d737e460f3d09e089e1383f6..7c889c04604b5ec0d9faaec30d0b612275c4cda4 100644 (file)
@@ -24,7 +24,13 @@ extern unsigned long rkpm_bootdata_ddr_data;
 extern unsigned long rk3288_bootram_sz;
 
 void rockchip_slp_cpu_resume(void);
+#ifdef CONFIG_PM_SLEEP
 void __init rockchip_suspend_init(void);
+#else
+static inline void rockchip_suspend_init(void)
+{
+}
+#endif
 
 /****** following is rk3288 defined **********/
 #define RK3288_PMU_WAKEUP_CFG0         0x00