diff options
-rw-r--r-- | include/linux/timex.h | 2 | ||||
-rw-r--r-- | kernel/time/ntp.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/timex.h b/include/linux/timex.h index c00bcdd3ae42..9007313b5b71 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -82,7 +82,7 @@ | |||
82 | */ | 82 | */ |
83 | #define SHIFT_USEC 16 /* frequency offset scale (shift) */ | 83 | #define SHIFT_USEC 16 /* frequency offset scale (shift) */ |
84 | #define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC)) | 84 | #define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC)) |
85 | #define PPM_SCALE_INV_SHIFT 20 | 85 | #define PPM_SCALE_INV_SHIFT 19 |
86 | #define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \ | 86 | #define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \ |
87 | PPM_SCALE + 1) | 87 | PPM_SCALE + 1) |
88 | 88 | ||
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 450a45cb01c1..ddb0465a6baa 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -406,9 +406,8 @@ adj_done: | |||
406 | if (time_status & (STA_UNSYNC|STA_CLOCKERR)) | 406 | if (time_status & (STA_UNSYNC|STA_CLOCKERR)) |
407 | result = TIME_ERROR; | 407 | result = TIME_ERROR; |
408 | 408 | ||
409 | txc->freq = shift_right((s32)(time_freq >> PPM_SCALE_INV_SHIFT) * | 409 | txc->freq = shift_right((time_freq >> PPM_SCALE_INV_SHIFT) * |
410 | (s64)PPM_SCALE_INV, | 410 | (s64)PPM_SCALE_INV, NTP_SCALE_SHIFT); |
411 | NTP_SCALE_SHIFT); | ||
412 | txc->maxerror = time_maxerror; | 411 | txc->maxerror = time_maxerror; |
413 | txc->esterror = time_esterror; | 412 | txc->esterror = time_esterror; |
414 | txc->status = time_status; | 413 | txc->status = time_status; |