diff options
Diffstat (limited to 'include/linux/pps_kernel.h')
-rw-r--r-- | include/linux/pps_kernel.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h index 1d2cd21242e8..54bf1484d41f 100644 --- a/include/linux/pps_kernel.h +++ b/include/linux/pps_kernel.h | |||
@@ -48,9 +48,9 @@ struct pps_source_info { | |||
48 | 48 | ||
49 | struct pps_event_time { | 49 | struct pps_event_time { |
50 | #ifdef CONFIG_NTP_PPS | 50 | #ifdef CONFIG_NTP_PPS |
51 | struct timespec ts_raw; | 51 | struct timespec64 ts_raw; |
52 | #endif /* CONFIG_NTP_PPS */ | 52 | #endif /* CONFIG_NTP_PPS */ |
53 | struct timespec ts_real; | 53 | struct timespec64 ts_real; |
54 | }; | 54 | }; |
55 | 55 | ||
56 | /* The main struct */ | 56 | /* The main struct */ |
@@ -105,7 +105,7 @@ extern void pps_event(struct pps_device *pps, | |||
105 | struct pps_device *pps_lookup_dev(void const *cookie); | 105 | struct pps_device *pps_lookup_dev(void const *cookie); |
106 | 106 | ||
107 | static inline void timespec_to_pps_ktime(struct pps_ktime *kt, | 107 | static inline void timespec_to_pps_ktime(struct pps_ktime *kt, |
108 | struct timespec ts) | 108 | struct timespec64 ts) |
109 | { | 109 | { |
110 | kt->sec = ts.tv_sec; | 110 | kt->sec = ts.tv_sec; |
111 | kt->nsec = ts.tv_nsec; | 111 | kt->nsec = ts.tv_nsec; |
@@ -115,24 +115,24 @@ static inline void timespec_to_pps_ktime(struct pps_ktime *kt, | |||
115 | 115 | ||
116 | static inline void pps_get_ts(struct pps_event_time *ts) | 116 | static inline void pps_get_ts(struct pps_event_time *ts) |
117 | { | 117 | { |
118 | getnstime_raw_and_real(&ts->ts_raw, &ts->ts_real); | 118 | ktime_get_raw_and_real_ts64(&ts->ts_raw, &ts->ts_real); |
119 | } | 119 | } |
120 | 120 | ||
121 | #else /* CONFIG_NTP_PPS */ | 121 | #else /* CONFIG_NTP_PPS */ |
122 | 122 | ||
123 | static inline void pps_get_ts(struct pps_event_time *ts) | 123 | static inline void pps_get_ts(struct pps_event_time *ts) |
124 | { | 124 | { |
125 | getnstimeofday(&ts->ts_real); | 125 | ktime_get_real_ts64(&ts->ts_real); |
126 | } | 126 | } |
127 | 127 | ||
128 | #endif /* CONFIG_NTP_PPS */ | 128 | #endif /* CONFIG_NTP_PPS */ |
129 | 129 | ||
130 | /* Subtract known time delay from PPS event time(s) */ | 130 | /* Subtract known time delay from PPS event time(s) */ |
131 | static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec delta) | 131 | static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec64 delta) |
132 | { | 132 | { |
133 | ts->ts_real = timespec_sub(ts->ts_real, delta); | 133 | ts->ts_real = timespec64_sub(ts->ts_real, delta); |
134 | #ifdef CONFIG_NTP_PPS | 134 | #ifdef CONFIG_NTP_PPS |
135 | ts->ts_raw = timespec_sub(ts->ts_raw, delta); | 135 | ts->ts_raw = timespec64_sub(ts->ts_raw, delta); |
136 | #endif | 136 | #endif |
137 | } | 137 | } |
138 | 138 | ||