aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r--drivers/hid/usbhid/hid-quirks.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index cc1927b1b88a..d57a37997f9a 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -43,8 +43,6 @@ static const struct hid_blacklist {
43 43
44 { USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016, HID_QUIRK_FULLSPEED_INTERVAL }, 44 { USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016, HID_QUIRK_FULLSPEED_INTERVAL },
45 45
46 { USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE, HID_QUIRK_HIDDEV | HID_QUIRK_IGNORE_HIDINPUT },
47
48 { USB_VENDOR_ID_PANTHERLORD, USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK, HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS }, 46 { USB_VENDOR_ID_PANTHERLORD, USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK, HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS },
49 { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT }, 47 { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT },
50 48
@@ -75,8 +73,6 @@ static const struct hid_rdesc_blacklist {
75 __u16 idProduct; 73 __u16 idProduct;
76 __u32 quirks; 74 __u32 quirks;
77} hid_rdesc_blacklist[] = { 75} hid_rdesc_blacklist[] = {
78 { USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE, HID_QUIRK_RDESC_SAMSUNG_REMOTE },
79
80 { 0, 0 } 76 { 0, 0 }
81}; 77};
82 78
@@ -308,37 +304,8 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct)
308 304
309EXPORT_SYMBOL_GPL(usbhid_lookup_quirk); 305EXPORT_SYMBOL_GPL(usbhid_lookup_quirk);
310 306
311/*
312 * Samsung IrDA remote controller (reports as Cypress USB Mouse).
313 *
314 * Vendor specific report #4 has a size of 48 bit,
315 * and therefore is not accepted when inspecting the descriptors.
316 * As a workaround we reinterpret the report as:
317 * Variable type, count 6, size 8 bit, log. maximum 255
318 * The burden to reconstruct the data is moved into user space.
319 */
320static void usbhid_fixup_samsung_irda_descriptor(unsigned char *rdesc,
321 int rsize)
322{
323 if (rsize >= 182 && rdesc[175] == 0x25
324 && rdesc[176] == 0x40
325 && rdesc[177] == 0x75
326 && rdesc[178] == 0x30
327 && rdesc[179] == 0x95
328 && rdesc[180] == 0x01
329 && rdesc[182] == 0x40) {
330 printk(KERN_INFO "Fixing up Samsung IrDA report descriptor\n");
331 rdesc[176] = 0xff;
332 rdesc[178] = 0x08;
333 rdesc[180] = 0x06;
334 rdesc[182] = 0x42;
335 }
336}
337
338static void __usbhid_fixup_report_descriptor(__u32 quirks, char *rdesc, unsigned rsize) 307static void __usbhid_fixup_report_descriptor(__u32 quirks, char *rdesc, unsigned rsize)
339{ 308{
340 if (quirks & HID_QUIRK_RDESC_SAMSUNG_REMOTE)
341 usbhid_fixup_samsung_irda_descriptor(rdesc, rsize);
342} 309}
343 310
344/** 311/**