Skip to contentSkip to conversation

time: Cleanup xtime references in ntp.c

PATCH In review John Stultz 1 participant 2 messages Jan 29, 2010 Timekeeping, clocksource core, NTP, alarmtimer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 time: Cleanup xtime references in ntp.c

ntp.c doesn't need to access timekeeping internals directly, so change xtime references to use the get_seconds() timekeeping interface.

---
 kernel/time/ntp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/time/ntp.c +3 -3
index 4800f93..0470927 100644
@@ -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) <<
@@ -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;
Signature · 1 line
1.6.0.4
#1 lore raw

[tip:timers/core] ntp: Cleanup xtime references in ntp.c

Commit-ID:  7e1b584774c6168ca5b27c340fbeff8f67651e4f
Gitweb:     http://git.kernel.org/tip/7e1b584774c6168ca5b27c340fbeff8f67651e4f
Author:     John Stultz <[email protected]>
AuthorDate: Thu, 28 Jan 2010 20:20:44 -0800
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Fri, 29 Jan 2010 10:15:19 +0100

ntp: Cleanup xtime references in ntp.c

ntp.c doesn't need to access timekeeping internals directly, so change xtime references to use the get_seconds() timekeeping interface.

LKML-Reference: <[email protected]>

---
 kernel/time/ntp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/time/ntp.c +3 -3
index 74b1b37..7c0f180 100644
@@ -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) <<
@@ -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;