1 From a882b14fe84951e236cd074e93575adc8a4be32e Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= <daniel-gl@gmx.net>
3 Date: Mon, 13 Oct 2014 15:53:16 -0700
4 Subject: rtc-cmos: fix wakeup from S5 without CONFIG_PM_SLEEP
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= <daniel-gl@gmx.net>
11 commit a882b14fe84951e236cd074e93575adc8a4be32e upstream.
13 Commit b5ada4600dfd ("drivers/rtc/rtc-cmos.c: fix compilation warning
14 when !CONFIG_PM_SLEEP") broke wakeup from S5 by making cmos_poweroff a
15 nop unless CONFIG_PM_SLEEP was defined.
17 Fix this by restricting the #ifdef to cmos_resume and restoring the old
18 dependency on CONFIG_PM for cmos_suspend and cmos_poweroff.
20 Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
21 Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
22 Cc: Alessandro Zummo <a.zummo@towertech.it>
23 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
24 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28 drivers/rtc/rtc-cmos.c | 5 ++++-
29 1 file changed, 4 insertions(+), 1 deletion(-)
31 --- a/drivers/rtc/rtc-cmos.c
32 +++ b/drivers/rtc/rtc-cmos.c
33 @@ -856,7 +856,7 @@ static void __exit cmos_do_remove(struct
37 -#ifdef CONFIG_PM_SLEEP
40 static int cmos_suspend(struct device *dev)
42 @@ -907,6 +907,8 @@ static inline int cmos_poweroff(struct d
43 return cmos_suspend(dev);
46 +#ifdef CONFIG_PM_SLEEP
48 static int cmos_resume(struct device *dev)
50 struct cmos_rtc *cmos = dev_get_drvdata(dev);
51 @@ -954,6 +956,7 @@ static int cmos_resume(struct device *de
58 static inline int cmos_poweroff(struct device *dev)