• Jiri Kosina's avatar
    USB HID: report descriptor of Cypress USB barcode readers needs fixup · 66da8769
    Jiri Kosina authored
    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: default avatarBret Towe <magnade@gmail.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    66da8769
hid-core.c 30.3 KB