summaryrefslogtreecommitdiff
path: root/kernel/time/ntp.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-07-16 21:04:04 +0000
committerJohn Stultz <john.stultz@linaro.org>2014-07-23 10:17:55 -0700
commitd6d29896c665dfd50e6e0be7a9039901640433a3 (patch)
treef6f80e9658798bb94f1aef2b06ddb63d5f32e26d /kernel/time/ntp.c
parent8b094cd03b4a3793220d8d8d86a173bfea8c285b (diff)
downloadlwn-d6d29896c665dfd50e6e0be7a9039901640433a3.tar.gz
lwn-d6d29896c665dfd50e6e0be7a9039901640433a3.zip
timekeeping: Provide timespec64 based interfaces
To convert callers of the core code to timespec64 we need to provide the proper interfaces. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/time/ntp.c')
-rw-r--r--kernel/time/ntp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 6e87df94122f..87a346fd6d61 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -466,7 +466,8 @@ static DECLARE_DELAYED_WORK(sync_cmos_work, sync_cmos_clock);
static void sync_cmos_clock(struct work_struct *work)
{
- struct timespec now, next;
+ struct timespec64 now;
+ struct timespec next;
int fail = 1;
/*
@@ -485,9 +486,9 @@ static void sync_cmos_clock(struct work_struct *work)
return;
}
- getnstimeofday(&now);
+ getnstimeofday64(&now);
if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec * 5) {
- struct timespec adjust = now;
+ struct timespec adjust = timespec64_to_timespec(now);
fail = -ENODEV;
if (persistent_clock_is_local)