* [PATCH] time: Cleanup xtime references in ntp.c
@ 2010-01-29 4:20 John Stultz
2010-01-29 9:33 ` [tip:timers/core] ntp: " tip-bot for John Stultz
0 siblings, 1 reply; 2+ messages in thread
From: John Stultz @ 2010-01-29 4:20 UTC (permalink / raw)
To: Thomas Gleixner, richard, lkml; +Cc: John Stultz
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>
---
kernel/time/ntp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 4800f93..0470927 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -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;
--
1.6.0.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:timers/core] ntp: Cleanup xtime references in ntp.c
2010-01-29 4:20 [PATCH] time: Cleanup xtime references in ntp.c John Stultz
@ 2010-01-29 9:33 ` tip-bot for John Stultz
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for John Stultz @ 2010-01-29 9:33 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, johnstul, tglx
Commit-ID: 7e1b584774c6168ca5b27c340fbeff8f67651e4f
Gitweb: http://git.kernel.org/tip/7e1b584774c6168ca5b27c340fbeff8f67651e4f
Author: John Stultz <johnstul@us.ibm.com>
AuthorDate: Thu, 28 Jan 2010 20:20:44 -0800
Committer: Thomas Gleixner <tglx@linutronix.de>
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.
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>
---
kernel/time/ntp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 74b1b37..7c0f180 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-29 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-29 4:20 [PATCH] time: Cleanup xtime references in ntp.c John Stultz
2010-01-29 9:33 ` [tip:timers/core] ntp: " tip-bot for John Stultz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome