mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
um: Convert to use read_persistent_clock
This patch converts the um arch to use read_persistent_clock(). This allows it to avoid accessing xtime and wall_to_monotonic directly. Signed-off-by: John Stultz <[email protected]> Cc: Jeff Dike <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
7615856ebf
commit
9f31f57749
1 changed files with 7 additions and 6 deletions
|
|
@ -102,16 +102,17 @@ static void __init setup_itimer(void)
|
|||
clockevents_register_device(&itimer_clockevent);
|
||||
}
|
||||
|
||||
void read_persistent_clock(struct timespec *ts)
|
||||
{
|
||||
nsecs = os_nsecs();
|
||||
set_normalized_timespec(ts, nsecs / NSEC_PER_SEC,
|
||||
nsecs % NSEC_PER_SEC);
|
||||
}
|
||||
|
||||
void __init time_init(void)
|
||||
{
|
||||
long long nsecs;
|
||||
|
||||
timer_init();
|
||||
|
||||
nsecs = os_nsecs();
|
||||
set_normalized_timespec(&wall_to_monotonic, -nsecs / NSEC_PER_SEC,
|
||||
-nsecs % NSEC_PER_SEC);
|
||||
set_normalized_timespec(&xtime, nsecs / NSEC_PER_SEC,
|
||||
nsecs % NSEC_PER_SEC);
|
||||
late_time_init = setup_itimer;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue