diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-11-24 18:44:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-24 18:44:46 +0200 |
| commit | 1b25f5c916fb463079e25f396e612f0792c78da3 (patch) | |
| tree | f0bda509d5b7ae042db8ec3cb8c2064d58628cff | |
| parent | 343c01bcddf5368ef5465c9848c37bbe6ffc950d (diff) | |
| parent | f5b2d53fe908a847d8000d7831d411cf68731fca (diff) | |
| download | hid-tmff2-1b25f5c916fb463079e25f396e612f0792c78da3.tar.gz hid-tmff2-1b25f5c916fb463079e25f396e612f0792c78da3.zip | |
Merge pull request #128 from MmAaXx500/linux612-compat
fix report_fixup() on linux 6.12
| -rw-r--r-- | src/hid-tmff2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hid-tmff2.c b/src/hid-tmff2.c index 3b51445..e691af4 100644 --- a/src/hid-tmff2.c +++ b/src/hid-tmff2.c @@ -2,6 +2,7 @@ #include <linux/workqueue.h> #include <linux/module.h> #include <linux/hid.h> +#include <linux/version.h> #include "hid-tmff2.h" @@ -712,8 +713,13 @@ oom_err: return ret; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,12,0) static __u8 *tmff2_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) +#else +static const __u8 *tmff2_report_fixup(struct hid_device *hdev, __u8 *rdesc, + unsigned int *rsize) +#endif { struct tmff2_device_entry *tmff2 = tmff2_from_hdev(hdev); |
