diff options
| author | James Morris <james.l.morris@oracle.com> | 2013-01-07 12:06:43 +1100 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2013-01-07 12:06:43 +1100 |
| commit | cf9ce948f47640797bd19980e1d99c6d17d0bdc3 (patch) | |
| tree | 97ce168cf32ac88b9aa93408b0b681747416a504 /include/linux/pps_kernel.h | |
| parent | e93072374112db9dc86635934ee761249be28370 (diff) | |
| parent | d1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff) | |
| download | cachepc-linux-cf9ce948f47640797bd19980e1d99c6d17d0bdc3.tar.gz cachepc-linux-cf9ce948f47640797bd19980e1d99c6d17d0bdc3.zip | |
Merge tag 'v3.8-rc2' into next
Sync to Linus' tree.
Linux 3.8-rc2
Diffstat (limited to 'include/linux/pps_kernel.h')
| -rw-r--r-- | include/linux/pps_kernel.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h index 94048547f29a..0cc45ae1afd5 100644 --- a/include/linux/pps_kernel.h +++ b/include/linux/pps_kernel.h @@ -116,5 +116,14 @@ static inline void pps_get_ts(struct pps_event_time *ts) #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 timespec delta) +{ + ts->ts_real = timespec_sub(ts->ts_real, delta); +#ifdef CONFIG_NTP_PPS + ts->ts_raw = timespec_sub(ts->ts_raw, delta); +#endif +} + #endif /* LINUX_PPS_KERNEL_H */ |
