]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/pps_kernel.h
kvm: replace test_and_set_bit_le() in mark_page_dirty_in_slot() with set_bit_le()
[karo-tx-linux.git] / include / linux / pps_kernel.h
index 94048547f29ad424e27013c4eaa17ca6ca28c422..0cc45ae1afd54aca12247724c73972a5ab8f6cc4 100644 (file)
@@ -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 */