]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc_sysfs_show_hctosys-return-0-if-resume-failed-fix
authorDavid Fries <david@fries.net>
Wed, 26 Sep 2012 01:34:38 +0000 (11:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:28:19 +0000 (17:28 +1000)
fix build

Signed-off-by: David Fries <David@Fries.net>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/class.c

index 6d5b12095ec042ade51445d7d4952bcac6fd5a37..ca58ea9137fc04c02f766b5e1538a260494bd4a6 100644 (file)
@@ -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
 
 
 /**