diff mbox series

[32/47] headers: Adapt signature of hrtimer_forward_now()

Message ID 20211019214320.2035704-33-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 5.15-rc6 | expand

Commit Message

Hauke Mehrtens Oct. 19, 2021, 9:43 p.m. UTC
The hrtimer_forward_now() function is now used by mac80211_hwsim.
In kernel 4.10 the type of the interval parameter of
hrtimer_forward_now() was changed from ktime_t to s64. This change
converts calls using the new version to the old one.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/interrupt.h | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/backport/backport-include/linux/interrupt.h b/backport/backport-include/linux/interrupt.h
index 41d50d7c..f42f2ddd 100644
--- a/backport/backport-include/linux/interrupt.h
+++ b/backport/backport-include/linux/interrupt.h
@@ -16,6 +16,15 @@  backport_hrtimer_forward(struct hrtimer *timer, ktime_t now, s64 interval)
 }
 #define hrtimer_forward LINUX_BACKPORT(hrtimer_forward)
 
+static inline u64
+backport_hrtimer_forward_now(struct hrtimer *timer, s64 interval)
+{
+	ktime_t _interval = { .tv64 = interval };
+
+	return hrtimer_forward_now(timer, _interval);
+}
+#define hrtimer_forward_now LINUX_BACKPORT(hrtimer_forward_now)
+
 static inline s64 backport_ns_to_ktime(u64 ns)
 {
 	ktime_t _time = ns_to_ktime(ns);