From b85f705a82849f01e11417650b2452352ed957f3 Mon Sep 17 00:00:00 2001 From: David Fries Date: Wed, 26 Sep 2012 11:34:38 +1000 Subject: [PATCH] rtc_sysfs_show_hctosys-return-0-if-resume-failed-fix fix build Signed-off-by: David Fries Reported-by: Stephen Rothwell Signed-off-by: Andrew Morton --- drivers/rtc/class.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 6d5b12095ec0..ca58ea9137fc 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -31,16 +31,18 @@ static void rtc_device_release(struct device *dev) kfree(rtc); } -#if defined(CONFIG_PM) && defined(CONFIG_RTC_HCTOSYS_DEVICE) +#ifdef CONFIG_RTC_HCTOSYS_DEVICE +/* Result of the last RTC to system clock attempt. */ +int rtc_hctosys_ret = -ENODEV; +#ifdef CONFIG_PM /* * On suspend(), measure the delta between one RTC and the * system's wall clock; restore it on resume(). */ static struct timespec old_rtc, old_system, old_delta; -/* Result of the last RTC to system clock attempt. */ -int rtc_hctosys_ret = -ENODEV; + static int rtc_suspend(struct device *dev, pm_message_t mesg) { @@ -127,6 +129,7 @@ static int rtc_resume(struct device *dev) #define rtc_suspend NULL #define rtc_resume NULL #endif +#endif /** -- 2.39.5