[PATCH 2/3] backports: add timer_delete_sync()

Johannes Berg <[email protected]> Fri, 24 May 2024 19:48:17 +0200
Newsgroups org.kernel.vger.backports
Message-ID <20240524194829.ff76233b3f76.I5bacafcbce1f73629f1279043650962ad7573025@changeid>
From: Johannes Berg <[email protected]>

Signed-off-by: Johannes Berg <[email protected]>
---
 backport/backport-include/linux/timer.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/backport/backport-include/linux/timer.h b/backport/backport-include/linux/timer.h
index 69590bb71324..ab0e2e6adcf5 100644
--- a/backport/backport-include/linux/timer.h
+++ b/backport/backport-include/linux/timer.h
@@ -67,4 +67,12 @@ static inline void timer_setup(struct timer_list *timer,
 		__TIMER_INITIALIZER(_function, 0, 0, 0)
 #endif
 
+#if LINUX_VERSION_IS_LESS(6,2,0)
+#define timer_delete_sync LINUX_BACKPORT(timer_delete_sync)
+static inline int timer_delete_sync(struct timer_list *timer)
+{
+	return del_timer_sync(timer);
+}
+#endif
+
 #endif /* _BACKPORT_TIMER_H */
-- 
2.45.1