diff options
Diffstat (limited to 'drivers/hid/usbhid/hid-quirks.c')
-rw-r--r-- | drivers/hid/usbhid/hid-quirks.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 7f38c21e146b..da80c64fb25c 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
@@ -31,7 +31,6 @@ static const struct hid_blacklist { | |||
31 | 31 | ||
32 | { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, | 32 | { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, |
33 | { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D, HID_QUIRK_2WHEEL_MOUSE_HACK_B8 }, | 33 | { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D, HID_QUIRK_2WHEEL_MOUSE_HACK_B8 }, |
34 | { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 }, | ||
35 | 34 | ||
36 | { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD, HID_QUIRK_BADPAD }, | 35 | { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD, HID_QUIRK_BADPAD }, |
37 | { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR, HID_QUIRK_BADPAD }, | 36 | { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR, HID_QUIRK_BADPAD }, |
@@ -93,9 +92,6 @@ static const struct hid_rdesc_blacklist { | |||
93 | 92 | ||
94 | { USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE, HID_QUIRK_RDESC_SAMSUNG_REMOTE }, | 93 | { USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE, HID_QUIRK_RDESC_SAMSUNG_REMOTE }, |
95 | 94 | ||
96 | { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1, HID_QUIRK_RDESC_SWAPPED_MIN_MAX }, | ||
97 | { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2, HID_QUIRK_RDESC_SWAPPED_MIN_MAX }, | ||
98 | |||
99 | { 0, 0 } | 95 | { 0, 0 } |
100 | }; | 96 | }; |
101 | 97 | ||
@@ -382,30 +378,6 @@ static void usbhid_fixup_petalynx_descriptor(unsigned char *rdesc, int rsize) | |||
382 | } | 378 | } |
383 | } | 379 | } |
384 | 380 | ||
385 | /* | ||
386 | * Some USB barcode readers from cypress have usage min and usage max in | ||
387 | * the wrong order | ||
388 | */ | ||
389 | static void usbhid_fixup_cypress_descriptor(unsigned char *rdesc, int rsize) | ||
390 | { | ||
391 | short fixed = 0; | ||
392 | int i; | ||
393 | |||
394 | for (i = 0; i < rsize - 4; i++) { | ||
395 | if (rdesc[i] == 0x29 && rdesc [i+2] == 0x19) { | ||
396 | unsigned char tmp; | ||
397 | |||
398 | rdesc[i] = 0x19; rdesc[i+2] = 0x29; | ||
399 | tmp = rdesc[i+3]; | ||
400 | rdesc[i+3] = rdesc[i+1]; | ||
401 | rdesc[i+1] = tmp; | ||
402 | } | ||
403 | } | ||
404 | |||
405 | if (fixed) | ||
406 | printk(KERN_INFO "Fixing up Cypress report descriptor\n"); | ||
407 | } | ||
408 | |||
409 | static void usbhid_fixup_button_consumer_descriptor(unsigned char *rdesc, int rsize) | 381 | static void usbhid_fixup_button_consumer_descriptor(unsigned char *rdesc, int rsize) |
410 | { | 382 | { |
411 | if (rsize >= 30 && rdesc[29] == 0x05 | 383 | if (rsize >= 30 && rdesc[29] == 0x05 |
@@ -420,9 +392,6 @@ static void __usbhid_fixup_report_descriptor(__u32 quirks, char *rdesc, unsigned | |||
420 | if ((quirks & HID_QUIRK_RDESC_CYMOTION)) | 392 | if ((quirks & HID_QUIRK_RDESC_CYMOTION)) |
421 | usbhid_fixup_cymotion_descriptor(rdesc, rsize); | 393 | usbhid_fixup_cymotion_descriptor(rdesc, rsize); |
422 | 394 | ||
423 | if (quirks & HID_QUIRK_RDESC_SWAPPED_MIN_MAX) | ||
424 | usbhid_fixup_cypress_descriptor(rdesc, rsize); | ||
425 | |||
426 | if (quirks & HID_QUIRK_RDESC_PETALYNX) | 395 | if (quirks & HID_QUIRK_RDESC_PETALYNX) |
427 | usbhid_fixup_petalynx_descriptor(rdesc, rsize); | 396 | usbhid_fixup_petalynx_descriptor(rdesc, rsize); |
428 | 397 | ||