summaryrefslogtreecommitdiff
path: root/kernel/time/posix-clock.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2017-03-26 22:04:15 +0300
committerThomas Gleixner <tglx@linutronix.de>2017-04-14 22:49:55 +0300
commitd2e3e0ca5df7f4ffe90a04790b3be20485df056a (patch)
treeadacd6b7a06d4ad0b0c27af80f0bcd37242222ae /kernel/time/posix-clock.c
parent3c9c12f4b4610dba864038c7822b427816f5893c (diff)
downloadlinux-d2e3e0ca5df7f4ffe90a04790b3be20485df056a.tar.xz
time: Change k_clock clock_getres() 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. The clock_getres() interface has also been changed to use timespec64 even though this particular interface is not affected by the y2038 problem. This helps verification for internal kernel code for y2038 readiness by getting rid of time_t/ timeval/ timespec completely. 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-5-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 fab6bd33155e..af91031f64de 100644
--- a/kernel/time/posix-clock.c
+++ b/kernel/time/posix-clock.c
@@ -316,20 +316,17 @@ static int pc_clock_gettime(clockid_t id, struct timespec64 *ts)
return err;
}
-static int pc_clock_getres(clockid_t id, struct timespec *ts)
+static int pc_clock_getres(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_getres) {
- err = cd.clk->ops.clock_getres(cd.clk, &ts64);
- *ts = timespec64_to_timespec(ts64);
- }
+ if (cd.clk->ops.clock_getres)
+ err = cd.clk->ops.clock_getres(cd.clk, ts);
else
err = -EOPNOTSUPP;