Merge tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2...
[deliverable/linux.git] / include / linux / pps_kernel.h
index 54bf1484d41f0333cc860c84307d23eda76477e5..35ac903956c7c0c282a9b0cfd74004212c8eb10d 100644 (file)
@@ -111,22 +111,17 @@ static inline void timespec_to_pps_ktime(struct pps_ktime *kt,
        kt->nsec = ts.tv_nsec;
 }
 
-#ifdef CONFIG_NTP_PPS
-
 static inline void pps_get_ts(struct pps_event_time *ts)
 {
-       ktime_get_raw_and_real_ts64(&ts->ts_raw, &ts->ts_real);
-}
+       struct system_time_snapshot snap;
 
-#else /* CONFIG_NTP_PPS */
-
-static inline void pps_get_ts(struct pps_event_time *ts)
-{
-       ktime_get_real_ts64(&ts->ts_real);
+       ktime_get_snapshot(&snap);
+       ts->ts_real = ktime_to_timespec64(snap.real);
+#ifdef CONFIG_NTP_PPS
+       ts->ts_raw = ktime_to_timespec64(snap.raw);
+#endif
 }
 
-#endif /* CONFIG_NTP_PPS */
-
 /* Subtract known time delay from PPS event time(s) */
 static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec64 delta)
 {
This page took 0.024983 seconds and 5 git commands to generate.