diff mbox series

[3/3] backports: add ktime_get_coarse_boottime_ns

Message ID 20220221151147.3fccada91a71.Id1c6b53e4c57d92eb838e4c09ef8042cd42f150f@changeid (mailing list archive)
State New, archived
Headers show
Series [1/3] backports: stub structs but remove ndo_fill_forward_path | expand

Commit Message

Johannes Berg Feb. 21, 2022, 2:11 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

... and simplify the code while at it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/timekeeping.h | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h
index 80c625569d6e..87744572bce6 100644
--- a/backport/backport-include/linux/timekeeping.h
+++ b/backport/backport-include/linux/timekeeping.h
@@ -6,23 +6,18 @@ 
 #include_next <linux/timekeeping.h>
 
 #if LINUX_VERSION_IS_LESS(5,3,0)
-#define ktime_get_boottime_ns LINUX_BACKPORT(ktime_get_boottime_ns)
-static inline u64 ktime_get_boottime_ns(void)
-{
-	return ktime_get_boot_ns();
-}
+#define ktime_get_boottime_ns ktime_get_boot_ns
+#define ktime_get_coarse_boottime_ns ktime_get_boot_ns
 #endif /* < 5.3 */
 
 #if LINUX_VERSION_IS_LESS(4,18,0)
 extern time64_t ktime_get_boottime_seconds(void);
-#endif /* < 4.18 */
 
-#if LINUX_VERSION_IS_LESS(4,18,0)
 #define ktime_get_raw_ts64 LINUX_BACKPORT(ktime_get_raw_ts64)
 static inline void ktime_get_raw_ts64(struct timespec64 *ts)
 {
 	return getrawmonotonic64(ts);
 }
-#endif
+#endif /* < 4.18 */
 
 #endif /* __BACKPORT_TIMEKEEPING_H */