Skip to content

Commit a882b14

Browse files
s09bQ5torvalds
authored andcommitted
rtc-cmos: fix wakeup from S5 without CONFIG_PM_SLEEP
Commit b5ada46 ("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>
1 parent 706b632 commit a882b14

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎drivers/rtc/rtc-cmos.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ static void __exit cmos_do_remove(struct device *dev)
856856
cmos->dev = NULL;
857857
}
858858

859-
#ifdef CONFIG_PM_SLEEP
859+
#ifdef CONFIG_PM
860860

861861
static int cmos_suspend(struct device *dev)
862862
{
@@ -907,6 +907,8 @@ static inline int cmos_poweroff(struct device *dev)
907907
return cmos_suspend(dev);
908908
}
909909

910+
#ifdef CONFIG_PM_SLEEP
911+
910912
static int cmos_resume(struct device *dev)
911913
{
912914
struct cmos_rtc *cmos = dev_get_drvdata(dev);
@@ -954,6 +956,7 @@ static int cmos_resume(struct device *dev)
954956
return 0;
955957
}
956958

959+
#endif
957960
#else
958961

959962
static inline int cmos_poweroff(struct device *dev)

0 commit comments

Comments
 (0)