diff options
-rw-r--r-- | kernel/time/ntp.c | 11 | ||||
-rw-r--r-- | kernel/time/timekeeping.c | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index d17e13c0147d..a331ebc32e21 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -666,17 +666,6 @@ int __do_adjtimex(struct timex *txc, struct timespec *ts, s32 *time_tai) | |||
666 | { | 666 | { |
667 | int result; | 667 | int result; |
668 | 668 | ||
669 | if (txc->modes & ADJ_SETOFFSET) { | ||
670 | struct timespec delta; | ||
671 | delta.tv_sec = txc->time.tv_sec; | ||
672 | delta.tv_nsec = txc->time.tv_usec; | ||
673 | if (!(txc->modes & ADJ_NANO)) | ||
674 | delta.tv_nsec *= 1000; | ||
675 | result = timekeeping_inject_offset(&delta); | ||
676 | if (result) | ||
677 | return result; | ||
678 | } | ||
679 | |||
680 | raw_spin_lock_irq(&ntp_lock); | 669 | raw_spin_lock_irq(&ntp_lock); |
681 | 670 | ||
682 | if (txc->modes & ADJ_ADJTIME) { | 671 | if (txc->modes & ADJ_ADJTIME) { |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 5f7a2330dc3c..e44915c7b16c 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -1627,6 +1627,17 @@ int do_adjtimex(struct timex *txc) | |||
1627 | if (ret) | 1627 | if (ret) |
1628 | return ret; | 1628 | return ret; |
1629 | 1629 | ||
1630 | if (txc->modes & ADJ_SETOFFSET) { | ||
1631 | struct timespec delta; | ||
1632 | delta.tv_sec = txc->time.tv_sec; | ||
1633 | delta.tv_nsec = txc->time.tv_usec; | ||
1634 | if (!(txc->modes & ADJ_NANO)) | ||
1635 | delta.tv_nsec *= 1000; | ||
1636 | ret = timekeeping_inject_offset(&delta); | ||
1637 | if (ret) | ||
1638 | return ret; | ||
1639 | } | ||
1640 | |||
1630 | getnstimeofday(&ts); | 1641 | getnstimeofday(&ts); |
1631 | orig_tai = tai = timekeeping_get_tai_offset(); | 1642 | orig_tai = tai = timekeeping_get_tai_offset(); |
1632 | 1643 | ||