From: David Woodhouse A recent commit changed ktime_get_snapshot_id() to return a corrected ::systime value which takes into account the divergence of the normal per-tick timekeeping from the ideal NTP-disciplined clock. Rather than using that more accurate timestamp *only* in the case where CONFIG_NTP_PPS is enabled, do so unconditionally. Signed-off-by: David Woodhouse --- include/linux/pps_kernel.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h index 9f088c9023b1..5eeed6695882 100644 --- a/include/linux/pps_kernel.h +++ b/include/linux/pps_kernel.h @@ -99,14 +99,12 @@ static inline void timespec_to_pps_ktime(struct pps_ktime *kt, static inline void pps_get_ts(struct pps_event_time *ts) { -#ifdef CONFIG_NTP_PPS struct system_time_snapshot snap; ktime_get_snapshot_id(CLOCK_REALTIME, &snap); ts->ts_real = ktime_to_timespec64(snap.systime); +#ifdef CONFIG_NTP_PPS ts->ts_raw = ktime_to_timespec64(snap.monoraw); -#else - ktime_get_real_ts64(&ts->ts_real); #endif } -- 2.54.0