mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04: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 <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
d340266e19
commit
3c9c12f4b4
8 changed files with 41 additions and 34 deletions
|
|
@ -478,13 +478,13 @@ static int sgi_clock_period;
|
|||
static struct timespec sgi_clock_offset;
|
||||
static int sgi_clock_period;
|
||||
|
||||
static int sgi_clock_get(clockid_t clockid, struct timespec *tp)
|
||||
static int sgi_clock_get(clockid_t clockid, struct timespec64 *tp)
|
||||
{
|
||||
u64 nsec;
|
||||
|
||||
nsec = rtc_time() * sgi_clock_period
|
||||
+ sgi_clock_offset.tv_nsec;
|
||||
*tp = ns_to_timespec(nsec);
|
||||
*tp = ns_to_timespec64(nsec);
|
||||
tp->tv_sec += sgi_clock_offset.tv_sec;
|
||||
return 0;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue