mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 14:31:46 +00: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:
parent
d340266e19
commit
3c9c12f4b4
8 changed files with 41 additions and 34 deletions
|
@ -558,14 +558,14 @@ static int alarm_clock_getres(const clockid_t which_clock, struct timespec *tp)
|
|||
*
|
||||
* Provides the underlying alarm base time.
|
||||
*/
|
||||
static int alarm_clock_get(clockid_t which_clock, struct timespec *tp)
|
||||
static int alarm_clock_get(clockid_t which_clock, struct timespec64 *tp)
|
||||
{
|
||||
struct alarm_base *base = &alarm_bases[clock2alarm(which_clock)];
|
||||
|
||||
if (!alarmtimer_get_rtcdev())
|
||||
return -EINVAL;
|
||||
|
||||
*tp = ktime_to_timespec(base->gettime());
|
||||
*tp = ktime_to_timespec64(base->gettime());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue