summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-lg.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-10-23 22:49:32 +0200
committerJiri Kosina <jkosina@suse.cz>2010-10-23 22:49:32 +0200
commit8b66a16f25f819bb1f132f075c5c01a288776cf8 (patch)
treeff6e16818194aca66d8ea34f9765067b2a82020a /drivers/hid/hid-lg.c
parentbbd128b5acae85b2ef346e95cc5a729ac5252f19 (diff)
parent41fa92302be7fa37c5c38e17e2097d3e5e9da13a (diff)
downloadop-kernel-dev-8b66a16f25f819bb1f132f075c5c01a288776cf8.zip
op-kernel-dev-8b66a16f25f819bb1f132f075c5c01a288776cf8.tar.gz
Merge branch 'uc-logic' into for-linus
Conflicts: drivers/hid/hid-ids.h drivers/hid/hid-lg.c drivers/hid/usbhid/hid-quirks.c
Diffstat (limited to 'drivers/hid/hid-lg.c')
-rw-r--r--drivers/hid/hid-lg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index 9e92c27..6d3cd7e 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -46,26 +46,25 @@
* above the logical maximum described in descriptor. This extends
* the original value of 0x28c of logical maximum to 0x104d
*/
-static void lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
- unsigned int rsize)
+static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
+ unsigned int *rsize)
{
unsigned long quirks = (unsigned long)hid_get_drvdata(hdev);
- if ((quirks & LG_RDESC) && rsize >= 90 && rdesc[83] == 0x26 &&
+ if ((quirks & LG_RDESC) && *rsize >= 90 && rdesc[83] == 0x26 &&
rdesc[84] == 0x8c && rdesc[85] == 0x02) {
dev_info(&hdev->dev, "fixing up Logitech keyboard report "
"descriptor\n");
rdesc[84] = rdesc[89] = 0x4d;
rdesc[85] = rdesc[90] = 0x10;
}
- if ((quirks & LG_RDESC_REL_ABS) && rsize >= 50 &&
+ if ((quirks & LG_RDESC_REL_ABS) && *rsize >= 50 &&
rdesc[32] == 0x81 && rdesc[33] == 0x06 &&
rdesc[49] == 0x81 && rdesc[50] == 0x06) {
dev_info(&hdev->dev, "fixing up rel/abs in Logitech "
"report descriptor\n");
rdesc[33] = rdesc[50] = 0x02;
}
-
if ((quirks & LG_FF4) && rsize >= 101 &&
rdesc[41] == 0x95 && rdesc[42] == 0x0B &&
rdesc[47] == 0x05 && rdesc[48] == 0x09) {
@@ -76,6 +75,7 @@ static void lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
rdesc[47] = 0x95;
rdesc[48] = 0x0B;
}
+ return rdesc;
}
#define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \
OpenPOWER on IntegriCloud