Skip to content

Commit

Permalink
hid-xpadneo: Allow building with kernel 6.12
Browse files Browse the repository at this point in the history
Kernel 6.12 changed the signature of a HID function. We can simply
conditionally use the one or the other based on the kernel version.

Fixes: #498
Signed-off-by: Kai Krakow <kai@kaishome.de>
  • Loading branch information
kakra committed Oct 31, 2024
1 parent 7d451ed commit 4bfe0a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hid-xpadneo/src/hid-xpadneo.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,11 @@ static int xpadneo_input_mapping(struct hid_device *hdev, struct hid_input *hi,
return MAP_AUTO;
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,12,0)
static u8 *xpadneo_report_fixup(struct hid_device *hdev, u8 *rdesc, unsigned int *rsize)
#else
static const u8 *xpadneo_report_fixup(struct hid_device *hdev, u8 *rdesc, unsigned int *rsize)
#endif
{
struct xpadneo_devdata *xdata = hid_get_drvdata(hdev);

Expand Down

0 comments on commit 4bfe0a1

Please sign in to comment.