This source file includes following definitions.
- redragon_report_fixup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #include <linux/device.h>
16 #include <linux/hid.h>
17 #include <linux/module.h>
18
19 #include "hid-ids.h"
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 static __u8 *redragon_report_fixup(struct hid_device *hdev, __u8 *rdesc,
37 unsigned int *rsize)
38 {
39 if (*rsize >= 102 && rdesc[100] == 0x81 && rdesc[101] == 0x00) {
40 dev_info(&hdev->dev, "Fixing Redragon ASURA report descriptor.\n");
41 rdesc[101] = 0x02;
42 }
43
44 return rdesc;
45 }
46
47 static const struct hid_device_id redragon_devices[] = {
48 {HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_REDRAGON_ASURA)},
49 {}
50 };
51
52 MODULE_DEVICE_TABLE(hid, redragon_devices);
53
54 static struct hid_driver redragon_driver = {
55 .name = "redragon",
56 .id_table = redragon_devices,
57 .report_fixup = redragon_report_fixup
58 };
59
60 module_hid_driver(redragon_driver);
61
62 MODULE_LICENSE("GPL");