mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
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>
This commit is contained in:
committed by
Thomas Gleixner
parent
d340266e19
commit
3c9c12f4b4
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user