diff options
-rw-r--r-- | drivers/rtc/class.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index f8a0aab218cb..c01773f56435 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c | |||
@@ -50,6 +50,10 @@ static int rtc_suspend(struct device *dev, pm_message_t mesg) | |||
50 | struct rtc_device *rtc = to_rtc_device(dev); | 50 | struct rtc_device *rtc = to_rtc_device(dev); |
51 | struct rtc_time tm; | 51 | struct rtc_time tm; |
52 | struct timespec delta, delta_delta; | 52 | struct timespec delta, delta_delta; |
53 | |||
54 | if (has_persistent_clock()) | ||
55 | return 0; | ||
56 | |||
53 | if (strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE) != 0) | 57 | if (strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE) != 0) |
54 | return 0; | 58 | return 0; |
55 | 59 | ||
@@ -88,6 +92,9 @@ static int rtc_resume(struct device *dev) | |||
88 | struct timespec new_system, new_rtc; | 92 | struct timespec new_system, new_rtc; |
89 | struct timespec sleep_time; | 93 | struct timespec sleep_time; |
90 | 94 | ||
95 | if (has_persistent_clock()) | ||
96 | return 0; | ||
97 | |||
91 | rtc_hctosys_ret = -ENODEV; | 98 | rtc_hctosys_ret = -ENODEV; |
92 | if (strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE) != 0) | 99 | if (strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE) != 0) |
93 | return 0; | 100 | return 0; |