Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion xpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
*/

// #define DEBUG
#include <linux/version.h>
#include <linux/bits.h>
#include <linux/kernel.h>
#include <linux/input.h>
Expand All @@ -73,6 +74,11 @@
#include <linux/usb/quirks.h>
#include <linux/timer.h>

// backward compatibility. del_timer_sync is renamed to timer_delete_sync since 6.15.0
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,15,0)
#define timer_delete_sync del_timer_sync
#endif

// enable compilation on pre 6.1 kernels
#ifndef ABS_PROFILE
#define ABS_PROFILE ABS_MISC
Expand Down Expand Up @@ -2520,7 +2526,7 @@ static void xpad_disconnect(struct usb_interface *intf)

if (xpad->quirks & QUIRK_GHL_XBOXONE) {
usb_free_urb(xpad->ghl_urb);
del_timer_sync(&xpad->ghl_poke_timer);
timer_delete_sync(&xpad->ghl_poke_timer);
}

usb_free_coherent(xpad->udev, XPAD_PKT_LEN,
Expand Down