[PATCH 03/12] header: Add ktime_get_boottime_ns()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hauke@xxxxxxxxxx>
---
 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)
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux