We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 902ffab commit 9caad15Copy full SHA for 9caad15
xpad.c
@@ -79,6 +79,11 @@
79
#define timer_delete_sync del_timer_sync
80
#endif
81
82
+// backward compatibility. from_timer is renamed to timer_container_of since 6.16.0
83
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0)
84
+#define timer_container_of from_timer
85
+#endif
86
+
87
// enable compilation on pre 6.1 kernels
88
#ifndef ABS_PROFILE
89
#define ABS_PROFILE ABS_MISC
@@ -846,7 +851,7 @@ static void ghl_magic_poke_cb(struct urb *urb)
846
851
static void ghl_magic_poke(struct timer_list *t)
847
852
{
848
853
int ret;
849
- struct usb_xpad *xpad = from_timer(xpad, t, ghl_poke_timer);
854
+ struct usb_xpad *xpad = timer_container_of(xpad, t, ghl_poke_timer);
850
855
856
ret = usb_submit_urb(xpad->ghl_urb, GFP_ATOMIC);
857
if (ret < 0)
0 commit comments