aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/usbhid/hid-core.c10
-rw-r--r--drivers/hid/usbhid/hid-quirks.c51
-rw-r--r--include/linux/hid.h1
3 files changed, 0 insertions, 62 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 78553b457a2b..e900d597bc2d 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -61,12 +61,6 @@ MODULE_PARM_DESC(quirks, "Add/modify USB HID quirks by specifying "
61 " quirks=vendorID:productID:quirks" 61 " quirks=vendorID:productID:quirks"
62 " where vendorID, productID, and quirks are all in" 62 " where vendorID, productID, and quirks are all in"
63 " 0x-prefixed hex"); 63 " 0x-prefixed hex");
64static char *rdesc_quirks_param[MAX_USBHID_BOOT_QUIRKS] = { [ 0 ... (MAX_USBHID_BOOT_QUIRKS - 1) ] = NULL };
65module_param_array_named(rdesc_quirks, rdesc_quirks_param, charp, NULL, 0444);
66MODULE_PARM_DESC(rdesc_quirks, "Add/modify report descriptor quirks by specifying "
67 " rdesc_quirks=vendorID:productID:rdesc_quirks"
68 " where vendorID, productID, and rdesc_quirks are all in"
69 " 0x-prefixed hex");
70/* 64/*
71 * Input submission and I/O error handler. 65 * Input submission and I/O error handler.
72 */ 66 */
@@ -826,10 +820,6 @@ static int usbhid_parse(struct hid_device *hid)
826 goto err; 820 goto err;
827 } 821 }
828 822
829 usbhid_fixup_report_descriptor(le16_to_cpu(dev->descriptor.idVendor),
830 le16_to_cpu(dev->descriptor.idProduct), rdesc,
831 rsize, rdesc_quirks_param);
832
833 dbg_hid("report descriptor (size %u, read %d) = ", rsize, n); 823 dbg_hid("report descriptor (size %u, read %d) = ", rsize, n);
834 for (n = 0; n < rsize; n++) 824 for (n = 0; n < rsize; n++)
835 dbg_hid_line(" %02x", (unsigned char) rdesc[n]); 825 dbg_hid_line(" %02x", (unsigned char) rdesc[n]);
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index d57a37997f9a..f66d2e43b5d5 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -67,15 +67,6 @@ static const struct hid_blacklist {
67 { 0, 0 } 67 { 0, 0 }
68}; 68};
69 69
70/* Quirks for devices which require report descriptor fixup go here */
71static const struct hid_rdesc_blacklist {
72 __u16 idVendor;
73 __u16 idProduct;
74 __u32 quirks;
75} hid_rdesc_blacklist[] = {
76 { 0, 0 }
77};
78
79/* Dynamic HID quirks list - specified at runtime */ 70/* Dynamic HID quirks list - specified at runtime */
80struct quirks_list_struct { 71struct quirks_list_struct {
81 struct hid_blacklist hid_bl_item; 72 struct hid_blacklist hid_bl_item;
@@ -303,45 +294,3 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct)
303} 294}
304 295
305EXPORT_SYMBOL_GPL(usbhid_lookup_quirk); 296EXPORT_SYMBOL_GPL(usbhid_lookup_quirk);
306
307static void __usbhid_fixup_report_descriptor(__u32 quirks, char *rdesc, unsigned rsize)
308{
309}
310
311/**
312 * usbhid_fixup_report_descriptor: check if report descriptor needs fixup
313 *
314 * Description:
315 * Walks the hid_rdesc_blacklist[] array and checks whether the device
316 * is known to have broken report descriptor that needs to be fixed up
317 * prior to entering the HID parser
318 *
319 * Returns: nothing
320 */
321void usbhid_fixup_report_descriptor(const u16 idVendor, const u16 idProduct,
322 char *rdesc, unsigned rsize, char **quirks_param)
323{
324 int n, m;
325 u16 paramVendor, paramProduct;
326 u32 quirks;
327
328 /* static rdesc quirk entries */
329 for (n = 0; hid_rdesc_blacklist[n].idVendor; n++)
330 if (hid_rdesc_blacklist[n].idVendor == idVendor &&
331 hid_rdesc_blacklist[n].idProduct == idProduct)
332 __usbhid_fixup_report_descriptor(hid_rdesc_blacklist[n].quirks,
333 rdesc, rsize);
334
335 /* runtime rdesc quirk entries handling */
336 for (n = 0; quirks_param[n] && n < MAX_USBHID_BOOT_QUIRKS; n++) {
337 m = sscanf(quirks_param[n], "0x%hx:0x%hx:0x%x",
338 &paramVendor, &paramProduct, &quirks);
339
340 if (m != 3)
341 printk(KERN_WARNING
342 "Could not parse HID quirk module param %s\n",
343 quirks_param[n]);
344 else if (paramVendor == idVendor && paramProduct == idProduct)
345 __usbhid_fixup_report_descriptor(quirks, rdesc, rsize);
346 }
347}
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 0de5fe8894d9..9eac330a1dfa 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -734,7 +734,6 @@ extern void hid_generic_exit(void);
734u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct); 734u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct);
735int usbhid_quirks_init(char **quirks_param); 735int usbhid_quirks_init(char **quirks_param);
736void usbhid_quirks_exit(void); 736void usbhid_quirks_exit(void);
737void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char **);
738 737
739#ifdef CONFIG_HID_FF 738#ifdef CONFIG_HID_FF
740int hid_ff_init(struct hid_device *hid); 739int hid_ff_init(struct hid_device *hid);