aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-cmos.c
diff options
context:
space:
mode:
authorDaniel Glöckner <daniel-gl@gmx.net>2014-10-13 18:53:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-13 20:18:19 -0400
commita882b14fe84951e236cd074e93575adc8a4be32e (patch)
tree66d52ce2c8ce9eeb9b8b2f6bc38c26ff8fa7895d /drivers/rtc/rtc-cmos.c
parent706b632d042c87a288f8b9adc8b6c83207e6d452 (diff)
rtc-cmos: fix wakeup from S5 without CONFIG_PM_SLEEP
Commit b5ada4600dfd ("drivers/rtc/rtc-cmos.c: fix compilation warning when !CONFIG_PM_SLEEP") broke wakeup from S5 by making cmos_poweroff a nop unless CONFIG_PM_SLEEP was defined. Fix this by restricting the #ifdef to cmos_resume and restoring the old dependency on CONFIG_PM for cmos_suspend and cmos_poweroff. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-cmos.c')
-rw-r--r--drivers/rtc/rtc-cmos.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index b0e4a3eb33c7..5b2e76159b41 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -856,7 +856,7 @@ static void __exit cmos_do_remove(struct device *dev)
856 cmos->dev = NULL; 856 cmos->dev = NULL;
857} 857}
858 858
859#ifdef CONFIG_PM_SLEEP 859#ifdef CONFIG_PM
860 860
861static int cmos_suspend(struct device *dev) 861static int cmos_suspend(struct device *dev)
862{ 862{
@@ -907,6 +907,8 @@ static inline int cmos_poweroff(struct device *dev)
907 return cmos_suspend(dev); 907 return cmos_suspend(dev);
908} 908}
909 909
910#ifdef CONFIG_PM_SLEEP
911
910static int cmos_resume(struct device *dev) 912static int cmos_resume(struct device *dev)
911{ 913{
912 struct cmos_rtc *cmos = dev_get_drvdata(dev); 914 struct cmos_rtc *cmos = dev_get_drvdata(dev);
@@ -954,6 +956,7 @@ static int cmos_resume(struct device *dev)
954 return 0; 956 return 0;
955} 957}
956 958
959#endif
957#else 960#else
958 961
959static inline int cmos_poweroff(struct device *dev) 962static inline int cmos_poweroff(struct device *dev)