]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
USB HID: report descriptor of Cypress USB barcode readers needs fixup
authorJiri Kosina <jkosina@suse.cz>
Wed, 2 May 2007 09:55:42 +0000 (11:55 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 9 May 2007 00:52:51 +0000 (02:52 +0200)
commit66da876962f782a3974b4a957d12f20656584a4d
tree84491635fd8524a2c46fcbc051fefdcbd48ba39b
parent3b180bff4c606b2596c40b26f85af6bc7d8cc50b
USB HID: report descriptor of Cypress USB barcode readers needs fixup

Certain versions of Cypress USB barcode readers (this problem is known to
happen at least with PIDs 0xde61 and 0xde64) have report descriptor which
has swapped usage min and usage max tag. This results in HID parser failing
for report descriptor of these devices, as it (wrongly) requires allocating
more usages than HID_MAX_USAGES.

Solve this by walking through the report descriptor for such devices, and swap
the usage min and usage max items (and their values) to be in proper order.

Reported-by: Bret Towe <magnade@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/hid-quirks.c
include/linux/hid.h