aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/posix-clock.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2017-03-26 12:04:14 -0700
committerThomas Gleixner <tglx@linutronix.de>2017-04-14 21:49:55 +0200
commit3c9c12f4b4610dba864038c7822b427816f5893c (patch)
tree0590f7b302a3984bfa7169b119dcc81c85731066 /kernel/time/posix-clock.c
parenttime: Change posix clocks ops interfaces to use timespec64 (diff)
downloadlinux-dev-3c9c12f4b4610dba864038c7822b427816f5893c.tar.xz
linux-dev-3c9c12f4b4610dba864038c7822b427816f5893c.zip
time: Change k_clock clock_get() to use timespec64
struct timespec is not y2038 safe on 32 bit machines. Replace uses of struct timespec with struct timespec64 in the kernel. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Cc: y2038@lists.linaro.org Cc: john.stultz@linaro.org Cc: arnd@arndb.de Link: http://lkml.kernel.org/r/1490555058-4603-4-git-send-email-deepa.kernel@gmail.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time/posix-clock.c')
-rw-r--r--kernel/time/posix-clock.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/time/posix-clock.c b/kernel/time/posix-clock.c
index e24008c098c6..fab6bd33155e 100644
--- a/kernel/time/posix-clock.c
+++ b/kernel/time/posix-clock.c
@@ -297,20 +297,17 @@ out:
return err;
}
-static int pc_clock_gettime(clockid_t id, struct timespec *ts)
+static int pc_clock_gettime(clockid_t id, struct timespec64 *ts)
{
struct posix_clock_desc cd;
- struct timespec64 ts64;
int err;
err = get_clock_desc(id, &cd);
if (err)
return err;
- if (cd.clk->ops.clock_gettime) {
- err = cd.clk->ops.clock_gettime(cd.clk, &ts64);
- *ts = timespec64_to_timespec(ts64);
- }
+ if (cd.clk->ops.clock_gettime)
+ err = cd.clk->ops.clock_gettime(cd.clk, ts);
else
err = -EOPNOTSUPP;