From 635b9c9b181cd14b3c8a9eb5c4ebeafff9afe8de Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 2 Aug 2019 21:29:38 +0200 Subject: header: Add ktime_get_boottime_ns() ktime_get_boottime_ns() was added in commit 9285ec4c8b61 ("timekeeping: Use proper clock specifier names in functions") in kernel 5.3. This is used by multiple drivers. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/timekeeping.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h index 71871531..25ceaf3e 100644 --- a/backport/backport-include/linux/timekeeping.h +++ b/backport/backport-include/linux/timekeeping.h @@ -17,11 +17,17 @@ static inline u64 ktime_get_ns(void) } extern ktime_t ktime_get_boottime(void); -#define ktime_get_boot_ns LINUX_BACKPORT(ktime_get_boot_ns) -static inline u64 ktime_get_boot_ns(void) +#define ktime_get_boottime_ns LINUX_BACKPORT(ktime_get_boottime_ns) +static inline u64 ktime_get_boottime_ns(void) { return ktime_to_ns(ktime_get_boottime()); } +#elif 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(); +} #endif /* < 3.17 */ #if LINUX_VERSION_IS_LESS(4,18,0) -- cgit v1.2.3