compile: fix smarthome compile error [1/1]
authorJianxin Pan <jianxin.pan@amlogic.com>
Sat, 30 Mar 2019 16:32:00 +0000 (00:32 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Mon, 1 Apr 2019 05:31:04 +0000 (22:31 -0700)
PD#SWPL-6186

Problem:
smarthome compile error

Solution:
fix smarthome compile error

Verify:
compile OK

Change-Id: I6909374b8abbeac8ccb4bca760208d309d24f4bd
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
include/linux/amlogic/power_ctrl.h

index 46cc3cd..5b6f721 100644 (file)
 #define _POWER_CTRL_H_
 #include <linux/types.h>
 
+#ifdef CONFIG_AMLOGIC_POWER
 int power_ctrl_sleep(bool power_on, unsigned int shift);
 int power_ctrl_iso(bool power_on, unsigned int shift);
 int power_ctrl_mempd0(bool power_on, unsigned int mask_val, unsigned int shift);
+#else
+static inline int power_ctrl_sleep(bool power_on, unsigned int shift)
+{
+       return -EINVAL;
+}
+
+static inline int power_ctrl_iso(bool power_on, unsigned int shift)
+{
+       return -EINVAL;
+}
+
+static inline int power_ctrl_mempd0(bool power_on, unsigned int mask_val,
+                                    unsigned int shift)
+{
+       return -EINVAL;
+}
+#endif
 #endif /*_POWER_CTRL_H_*/