diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2016-04-18 11:18:55 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2016-04-18 11:18:55 +0200 |
| commit | 9938b04472d5c59f8bd8152a548533a8599596a2 (patch) | |
| tree | 0fc8318100878c5e446076613ec02a97aa179119 /include/linux/pps_kernel.h | |
| parent | bd7ced98812dbb906950d8b0ec786f14f631cede (diff) | |
| parent | c3b46c73264b03000d1e18b22f5caf63332547c9 (diff) | |
Merge branch 'master' into for-next
Sync with Linus' tree so that patches against newer codebase can be applied.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
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, 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) { |
