From c646f59bd4d71b243da3619148d87f3d0a08ba03 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 26 Sep 2012 11:34:39 +1000 Subject: [PATCH] rtc_sysfs_show_hctosys-return-0-if-resume-failed-fix-fix drivers/rtc/class.c: In function 'rtc_init': drivers/rtc/class.c:261:23: error: 'rtc_suspend' undeclared (first use in t= his function) drivers/rtc/class.c:261:23: note: each undeclared identifier is reported on= ly once for each function it appears in drivers/rtc/class.c:262:22: error: 'rtc_resume' undeclared (first use in th= is function) Signed-off-by: Stephen Rothwell Cc: David Fries Signed-off-by: Andrew Morton --- drivers/rtc/class.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index ca58ea9137fc..f8a0aab218cb 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -34,8 +34,9 @@ static void rtc_device_release(struct device *dev) #ifdef CONFIG_RTC_HCTOSYS_DEVICE /* Result of the last RTC to system clock attempt. */ int rtc_hctosys_ret = -ENODEV; +#endif -#ifdef CONFIG_PM +#if defined(CONFIG_PM) && defined(CONFIG_RTC_HCTOSYS_DEVICE) /* * On suspend(), measure the delta between one RTC and the * system's wall clock; restore it on resume(). @@ -129,7 +130,6 @@ static int rtc_resume(struct device *dev) #define rtc_suspend NULL #define rtc_resume NULL #endif -#endif /** -- 2.39.5