diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-02-14 13:46:10 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-02-14 13:46:10 -0500 |
commit | 9f4646d28362bc424b8a4c7d09ea1c2f1759371a (patch) | |
tree | 0ff9dc36f1ef598736725f3eb30e164128d39774 /kernel/time | |
parent | 86c8ead593305915729a7b67f738832764fb4ba7 (diff) | |
parent | 84e345e4e209cbe796c88fa2ad1732d7121ec100 (diff) |
Merge branch 'fortglx/3.9/time' of git://git.linaro.org/people/jstultz/linux into timers/core
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/ntp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 313b161504b7..b10a42bb0165 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -511,13 +511,17 @@ static void sync_cmos_clock(struct work_struct *work) | |||
511 | 511 | ||
512 | getnstimeofday(&now); | 512 | getnstimeofday(&now); |
513 | if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec / 2) { | 513 | if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec / 2) { |
514 | struct timespec adjust = now; | ||
515 | |||
514 | fail = -ENODEV; | 516 | fail = -ENODEV; |
517 | if (persistent_clock_is_local) | ||
518 | adjust.tv_sec -= (sys_tz.tz_minuteswest * 60); | ||
515 | #ifdef CONFIG_GENERIC_CMOS_UPDATE | 519 | #ifdef CONFIG_GENERIC_CMOS_UPDATE |
516 | fail = update_persistent_clock(now); | 520 | fail = update_persistent_clock(adjust); |
517 | #endif | 521 | #endif |
518 | #ifdef CONFIG_RTC_SYSTOHC | 522 | #ifdef CONFIG_RTC_SYSTOHC |
519 | if (fail == -ENODEV) | 523 | if (fail == -ENODEV) |
520 | fail = rtc_set_ntp_time(now); | 524 | fail = rtc_set_ntp_time(adjust); |
521 | #endif | 525 | #endif |
522 | } | 526 | } |
523 | 527 | ||