diff options
Diffstat (limited to 'include/linux/pps_kernel.h')
| -rw-r--r-- | include/linux/pps_kernel.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h index 54bf1484d41f..35ac903956c7 100644 --- a/include/linux/pps_kernel.h +++ b/include/linux/pps_kernel.h | |||
| @@ -111,22 +111,17 @@ static inline void timespec_to_pps_ktime(struct pps_ktime *kt, | |||
| 111 | kt->nsec = ts.tv_nsec; | 111 | kt->nsec = ts.tv_nsec; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | #ifdef CONFIG_NTP_PPS | ||
| 115 | |||
| 116 | static inline void pps_get_ts(struct pps_event_time *ts) | 114 | static inline void pps_get_ts(struct pps_event_time *ts) |
| 117 | { | 115 | { |
| 118 | ktime_get_raw_and_real_ts64(&ts->ts_raw, &ts->ts_real); | 116 | struct system_time_snapshot snap; |
| 119 | } | ||
| 120 | 117 | ||
| 121 | #else /* CONFIG_NTP_PPS */ | 118 | ktime_get_snapshot(&snap); |
| 122 | 119 | ts->ts_real = ktime_to_timespec64(snap.real); | |
| 123 | static inline void pps_get_ts(struct pps_event_time *ts) | 120 | #ifdef CONFIG_NTP_PPS |
| 124 | { | 121 | ts->ts_raw = ktime_to_timespec64(snap.raw); |
| 125 | ktime_get_real_ts64(&ts->ts_real); | 122 | #endif |
| 126 | } | 123 | } |
| 127 | 124 | ||
| 128 | #endif /* CONFIG_NTP_PPS */ | ||
| 129 | |||
| 130 | /* Subtract known time delay from PPS event time(s) */ | 125 | /* Subtract known time delay from PPS event time(s) */ |
| 131 | static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec64 delta) | 126 | static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec64 delta) |
| 132 | { | 127 | { |
