diff options
Diffstat (limited to 'drivers/hid/hid-lg.c')
-rw-r--r-- | drivers/hid/hid-lg.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c index 9e92c27002ca..6d3cd7e5fa91 100644 --- a/drivers/hid/hid-lg.c +++ b/drivers/hid/hid-lg.c | |||
@@ -46,26 +46,25 @@ | |||
46 | * above the logical maximum described in descriptor. This extends | 46 | * above the logical maximum described in descriptor. This extends |
47 | * the original value of 0x28c of logical maximum to 0x104d | 47 | * the original value of 0x28c of logical maximum to 0x104d |
48 | */ | 48 | */ |
49 | static void lg_report_fixup(struct hid_device *hdev, __u8 *rdesc, | 49 | static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc, |
50 | unsigned int rsize) | 50 | unsigned int *rsize) |
51 | { | 51 | { |
52 | unsigned long quirks = (unsigned long)hid_get_drvdata(hdev); | 52 | unsigned long quirks = (unsigned long)hid_get_drvdata(hdev); |
53 | 53 | ||
54 | if ((quirks & LG_RDESC) && rsize >= 90 && rdesc[83] == 0x26 && | 54 | if ((quirks & LG_RDESC) && *rsize >= 90 && rdesc[83] == 0x26 && |
55 | rdesc[84] == 0x8c && rdesc[85] == 0x02) { | 55 | rdesc[84] == 0x8c && rdesc[85] == 0x02) { |
56 | dev_info(&hdev->dev, "fixing up Logitech keyboard report " | 56 | dev_info(&hdev->dev, "fixing up Logitech keyboard report " |
57 | "descriptor\n"); | 57 | "descriptor\n"); |
58 | rdesc[84] = rdesc[89] = 0x4d; | 58 | rdesc[84] = rdesc[89] = 0x4d; |
59 | rdesc[85] = rdesc[90] = 0x10; | 59 | rdesc[85] = rdesc[90] = 0x10; |
60 | } | 60 | } |
61 | if ((quirks & LG_RDESC_REL_ABS) && rsize >= 50 && | 61 | if ((quirks & LG_RDESC_REL_ABS) && *rsize >= 50 && |
62 | rdesc[32] == 0x81 && rdesc[33] == 0x06 && | 62 | rdesc[32] == 0x81 && rdesc[33] == 0x06 && |
63 | rdesc[49] == 0x81 && rdesc[50] == 0x06) { | 63 | rdesc[49] == 0x81 && rdesc[50] == 0x06) { |
64 | dev_info(&hdev->dev, "fixing up rel/abs in Logitech " | 64 | dev_info(&hdev->dev, "fixing up rel/abs in Logitech " |
65 | "report descriptor\n"); | 65 | "report descriptor\n"); |
66 | rdesc[33] = rdesc[50] = 0x02; | 66 | rdesc[33] = rdesc[50] = 0x02; |
67 | } | 67 | } |
68 | |||
69 | if ((quirks & LG_FF4) && rsize >= 101 && | 68 | if ((quirks & LG_FF4) && rsize >= 101 && |
70 | rdesc[41] == 0x95 && rdesc[42] == 0x0B && | 69 | rdesc[41] == 0x95 && rdesc[42] == 0x0B && |
71 | rdesc[47] == 0x05 && rdesc[48] == 0x09) { | 70 | rdesc[47] == 0x05 && rdesc[48] == 0x09) { |
@@ -76,6 +75,7 @@ static void lg_report_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
76 | rdesc[47] = 0x95; | 75 | rdesc[47] = 0x95; |
77 | rdesc[48] = 0x0B; | 76 | rdesc[48] = 0x0B; |
78 | } | 77 | } |
78 | return rdesc; | ||
79 | } | 79 | } |
80 | 80 | ||
81 | #define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ | 81 | #define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ |