Commit-ID: 9ecf37eb7a81e3295a1b274eafb6f83d7d2cabf0 Gitweb: http://git.kernel.org/tip/9ecf37eb7a81e3295a1b274eafb6f83d7d2cabf0 Author: Feng Tang <feng.tang@xxxxxxxxx> AuthorDate: Wed, 16 Jan 2013 00:09:48 +0800 Committer: John Stultz <john.stultz@xxxxxxxxxx> CommitDate: Tue, 15 Jan 2013 18:16:08 -0800 rtc: Skip the suspend/resume handling if persistent clock exist All the RTC suspend and resume functions are to compensate the sleep time, but this is already done in timekeeping.c if persistent clock exist. Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: John Stultz <john.stultz@xxxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: Arve Hjønnevåg <arve@xxxxxxxxxxx> Signed-off-by: Feng Tang <feng.tang@xxxxxxxxx> Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx> --- drivers/rtc/class.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index f8a0aab..c01773f 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) struct rtc_device *rtc = to_rtc_device(dev); struct rtc_time tm; struct timespec delta, delta_delta; + + if (has_persistent_clock()) + return 0; + if (strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE) != 0) return 0; @@ -88,6 +92,9 @@ static int rtc_resume(struct device *dev) struct timespec new_system, new_rtc; struct timespec sleep_time; + if (has_persistent_clock()) + return 0; + rtc_hctosys_ret = -ENODEV; if (strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE) != 0) return 0; -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html