Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Daniel Glöckner and committed by
Linus Torvalds
a882b14f 706b632d

+4 -1
+4 -1
drivers/rtc/rtc-cmos.c
··· 856 856 cmos->dev = NULL; 857 857 } 858 858 859 - #ifdef CONFIG_PM_SLEEP 859 + #ifdef CONFIG_PM 860 860 861 861 static int cmos_suspend(struct device *dev) 862 862 { ··· 907 907 return cmos_suspend(dev); 908 908 } 909 909 910 + #ifdef CONFIG_PM_SLEEP 911 + 910 912 static int cmos_resume(struct device *dev) 911 913 { 912 914 struct cmos_rtc *cmos = dev_get_drvdata(dev); ··· 956 954 return 0; 957 955 } 958 956 957 + #endif 959 958 #else 960 959 961 960 static inline int cmos_poweroff(struct device *dev)