]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.16.7/rtc-cmos-fix-wakeup-from-s5-without-config_pm_sleep.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.16.7 / rtc-cmos-fix-wakeup-from-s5-without-config_pm_sleep.patch
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
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= <daniel-gl@gmx.net>
10
11 commit a882b14fe84951e236cd074e93575adc8a4be32e upstream.
12
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.
16
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.
19
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>
26
27 ---
28 drivers/rtc/rtc-cmos.c | 5 ++++-
29 1 file changed, 4 insertions(+), 1 deletion(-)
30
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
34 cmos->dev = NULL;
35 }
36
37 -#ifdef CONFIG_PM_SLEEP
38 +#ifdef CONFIG_PM
39
40 static int cmos_suspend(struct device *dev)
41 {
42 @@ -907,6 +907,8 @@ static inline int cmos_poweroff(struct d
43 return cmos_suspend(dev);
44 }
45
46 +#ifdef CONFIG_PM_SLEEP
47 +
48 static int cmos_resume(struct device *dev)
49 {
50 struct cmos_rtc *cmos = dev_get_drvdata(dev);
51 @@ -954,6 +956,7 @@ static int cmos_resume(struct device *de
52 return 0;
53 }
54
55 +#endif
56 #else
57
58 static inline int cmos_poweroff(struct device *dev)