Skip to content

Commit

Permalink
ntp: Cleanup xtime references in ntp.c
Browse files Browse the repository at this point in the history
ntp.c doesn't need to access timekeeping internals directly, so change
xtime references to use the get_seconds() timekeeping interface.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: richard@rsk.demon.co.uk
LKML-Reference: <1264738844-21935-1-git-send-email-johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
John Stultz authored and Thomas Gleixner committed Jan 29, 2010
1 parent 1f5b8f8 commit 7e1b584
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ static void ntp_update_offset(long offset)
* Select how the frequency is to be controlled
* and in which mode (PLL or FLL).
*/
secs = xtime.tv_sec - time_reftime;
secs = get_seconds() - time_reftime;
if (unlikely(time_status & STA_FREQHOLD))
secs = 0;

time_reftime = xtime.tv_sec;
time_reftime = get_seconds();

offset64 = offset;
freq_adj = (offset64 * secs) <<
Expand Down Expand Up @@ -368,7 +368,7 @@ static inline void process_adj_status(struct timex *txc, struct timespec *ts)
* reference time to current time.
*/
if (!(time_status & STA_PLL) && (txc->status & STA_PLL))
time_reftime = xtime.tv_sec;
time_reftime = get_seconds();

/* only set allowed bits */
time_status &= STA_RONLY;
Expand Down

0 comments on commit 7e1b584

Please sign in to comment.