]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/rtc/class.c
rtc_sysfs_show_hctosys-return-0-if-resume-failed-fix-fix
[karo-tx-linux.git] / drivers / rtc / class.c
index ca58ea9137fc04c02f766b5e1538a260494bd4a6..f8a0aab218cbcd2777ea93b9e74aa96494e729fe 100644 (file)
@@ -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
 
 
 /**