timekeeping: Use ktime_get_real_ts64() instead of getnstimeofday64()
The two do the same, this moves all users to the newer name for consistency. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: John Stultz <john.stultz@linaro.org> Cc: y2038@lists.linaro.org Cc: Stephen Boyd <sboyd@kernel.org> Cc: Miroslav Lichvar <mlichvar@redhat.com> Link: https://lkml.kernel.org/r/20180618140811.2998503-3-arnd@arndb.de
This commit is contained in:
parent
f5a89295e2
commit
d30faff900
|
@ -502,7 +502,7 @@ static void sched_sync_hw_clock(struct timespec64 now,
|
||||||
{
|
{
|
||||||
struct timespec64 next;
|
struct timespec64 next;
|
||||||
|
|
||||||
getnstimeofday64(&next);
|
ktime_get_real_ts64(&next);
|
||||||
if (!fail)
|
if (!fail)
|
||||||
next.tv_sec = 659;
|
next.tv_sec = 659;
|
||||||
else {
|
else {
|
||||||
|
@ -537,7 +537,7 @@ static void sync_rtc_clock(void)
|
||||||
if (!IS_ENABLED(CONFIG_RTC_SYSTOHC))
|
if (!IS_ENABLED(CONFIG_RTC_SYSTOHC))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
getnstimeofday64(&now);
|
ktime_get_real_ts64(&now);
|
||||||
|
|
||||||
adjust = now;
|
adjust = now;
|
||||||
if (persistent_clock_is_local)
|
if (persistent_clock_is_local)
|
||||||
|
@ -591,7 +591,7 @@ static bool sync_cmos_clock(void)
|
||||||
* Architectures are strongly encouraged to use rtclib and not
|
* Architectures are strongly encouraged to use rtclib and not
|
||||||
* implement this legacy API.
|
* implement this legacy API.
|
||||||
*/
|
*/
|
||||||
getnstimeofday64(&now);
|
ktime_get_real_ts64(&now);
|
||||||
if (rtc_tv_nsec_ok(-1 * target_nsec, &adjust, &now)) {
|
if (rtc_tv_nsec_ok(-1 * target_nsec, &adjust, &now)) {
|
||||||
if (persistent_clock_is_local)
|
if (persistent_clock_is_local)
|
||||||
adjust.tv_sec -= (sys_tz.tz_minuteswest * 60);
|
adjust.tv_sec -= (sys_tz.tz_minuteswest * 60);
|
||||||
|
|
|
@ -2310,7 +2310,7 @@ int do_adjtimex(struct timex *txc)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
getnstimeofday64(&ts);
|
ktime_get_real_ts64(&ts);
|
||||||
|
|
||||||
raw_spin_lock_irqsave(&timekeeper_lock, flags);
|
raw_spin_lock_irqsave(&timekeeper_lock, flags);
|
||||||
write_seqcount_begin(&tk_core.seq);
|
write_seqcount_begin(&tk_core.seq);
|
||||||
|
|
Loading…
Reference in New Issue