diff options
author | Jiri Kosina <jkosina@suse.cz> | 2007-05-02 05:55:42 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2007-05-08 20:52:51 -0400 |
commit | 66da876962f782a3974b4a957d12f20656584a4d (patch) | |
tree | 84491635fd8524a2c46fcbc051fefdcbd48ba39b /include/linux/hid.h | |
parent | 3b180bff4c606b2596c40b26f85af6bc7d8cc50b (diff) |
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>
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r-- | include/linux/hid.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 37076b116ed0..827ee748fd4c 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -275,6 +275,7 @@ struct hid_item { | |||
275 | #define HID_QUIRK_LOGITECH_DESCRIPTOR 0x00100000 | 275 | #define HID_QUIRK_LOGITECH_DESCRIPTOR 0x00100000 |
276 | #define HID_QUIRK_DUPLICATE_USAGES 0x00200000 | 276 | #define HID_QUIRK_DUPLICATE_USAGES 0x00200000 |
277 | #define HID_QUIRK_RESET_LEDS 0x00400000 | 277 | #define HID_QUIRK_RESET_LEDS 0x00400000 |
278 | #define HID_QUIRK_SWAPPED_MIN_MAX 0x00800000 | ||
278 | 279 | ||
279 | /* | 280 | /* |
280 | * This is the global environment of the parser. This information is | 281 | * This is the global environment of the parser. This information is |