diff mbox series

[2/3] backports: add timer_delete_sync()

Message ID 20240524194829.ff76233b3f76.I5bacafcbce1f73629f1279043650962ad7573025@changeid (mailing list archive)
State New
Headers show
Series [1/3] backports: add list_count_nodes() | expand

Commit Message

Johannes Berg May 24, 2024, 5:48 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

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

Patch

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 */