diff mbox series

[74/75] headers: Add timer_delete_sync()

Message ID 20240627234808.1253337-75-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 6.1.95 | expand

Commit Message

Hauke Mehrtens June 27, 2024, 11:48 p.m. UTC
This function was renamed.

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

Patch

diff --git a/backport/backport-include/linux/timer.h b/backport/backport-include/linux/timer.h
index 69590bb7..14467fb6 100644
--- a/backport/backport-include/linux/timer.h
+++ b/backport/backport-include/linux/timer.h
@@ -67,4 +67,16 @@  static inline void timer_setup(struct timer_list *timer,
 		__TIMER_INITIALIZER(_function, 0, 0, 0)
 #endif
 
+/* This was backported to 4.19.312 and 5,4,274, but we do not support such high minor numbers use 255 instead. */
+#if LINUX_VERSION_IS_LESS(6,1,84) &&			\
+	!LINUX_VERSION_IN_RANGE(4,19,255, 4,20,0) &&	\
+	!LINUX_VERSION_IN_RANGE(5,4,255, 5,5,0) &&	\
+	!LINUX_VERSION_IN_RANGE(5,10,215, 5,11,0) &&	\
+	!LINUX_VERSION_IN_RANGE(5,15,154, 5,16,0)
+static inline int timer_delete_sync(struct timer_list *timer)
+{
+	return del_timer_sync(timer);
+}
+#endif /* < 6.1.84 */
+
 #endif /* _BACKPORT_TIMER_H */