提交 2b88b803 编写于 作者: J Jiri Slaby 提交者: Jiri Kosina

HID: remove rdesc quirk support

Remove support for both dynamic and static report descriptor
quirks. There is no longer rdesc code which it would support,
so it's useless.
Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 3715ade9
...@@ -61,12 +61,6 @@ MODULE_PARM_DESC(quirks, "Add/modify USB HID quirks by specifying " ...@@ -61,12 +61,6 @@ MODULE_PARM_DESC(quirks, "Add/modify USB HID quirks by specifying "
" quirks=vendorID:productID:quirks" " quirks=vendorID:productID:quirks"
" where vendorID, productID, and quirks are all in" " where vendorID, productID, and quirks are all in"
" 0x-prefixed hex"); " 0x-prefixed hex");
static char *rdesc_quirks_param[MAX_USBHID_BOOT_QUIRKS] = { [ 0 ... (MAX_USBHID_BOOT_QUIRKS - 1) ] = NULL };
module_param_array_named(rdesc_quirks, rdesc_quirks_param, charp, NULL, 0444);
MODULE_PARM_DESC(rdesc_quirks, "Add/modify report descriptor quirks by specifying "
" rdesc_quirks=vendorID:productID:rdesc_quirks"
" where vendorID, productID, and rdesc_quirks are all in"
" 0x-prefixed hex");
/* /*
* Input submission and I/O error handler. * Input submission and I/O error handler.
*/ */
...@@ -826,10 +820,6 @@ static int usbhid_parse(struct hid_device *hid) ...@@ -826,10 +820,6 @@ static int usbhid_parse(struct hid_device *hid)
goto err; goto err;
} }
usbhid_fixup_report_descriptor(le16_to_cpu(dev->descriptor.idVendor),
le16_to_cpu(dev->descriptor.idProduct), rdesc,
rsize, rdesc_quirks_param);
dbg_hid("report descriptor (size %u, read %d) = ", rsize, n); dbg_hid("report descriptor (size %u, read %d) = ", rsize, n);
for (n = 0; n < rsize; n++) for (n = 0; n < rsize; n++)
dbg_hid_line(" %02x", (unsigned char) rdesc[n]); dbg_hid_line(" %02x", (unsigned char) rdesc[n]);
......
...@@ -67,15 +67,6 @@ static const struct hid_blacklist { ...@@ -67,15 +67,6 @@ static const struct hid_blacklist {
{ 0, 0 } { 0, 0 }
}; };
/* Quirks for devices which require report descriptor fixup go here */
static const struct hid_rdesc_blacklist {
__u16 idVendor;
__u16 idProduct;
__u32 quirks;
} hid_rdesc_blacklist[] = {
{ 0, 0 }
};
/* Dynamic HID quirks list - specified at runtime */ /* Dynamic HID quirks list - specified at runtime */
struct quirks_list_struct { struct quirks_list_struct {
struct hid_blacklist hid_bl_item; struct hid_blacklist hid_bl_item;
...@@ -303,45 +294,3 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct) ...@@ -303,45 +294,3 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct)
} }
EXPORT_SYMBOL_GPL(usbhid_lookup_quirk); EXPORT_SYMBOL_GPL(usbhid_lookup_quirk);
static void __usbhid_fixup_report_descriptor(__u32 quirks, char *rdesc, unsigned rsize)
{
}
/**
* usbhid_fixup_report_descriptor: check if report descriptor needs fixup
*
* Description:
* Walks the hid_rdesc_blacklist[] array and checks whether the device
* is known to have broken report descriptor that needs to be fixed up
* prior to entering the HID parser
*
* Returns: nothing
*/
void usbhid_fixup_report_descriptor(const u16 idVendor, const u16 idProduct,
char *rdesc, unsigned rsize, char **quirks_param)
{
int n, m;
u16 paramVendor, paramProduct;
u32 quirks;
/* static rdesc quirk entries */
for (n = 0; hid_rdesc_blacklist[n].idVendor; n++)
if (hid_rdesc_blacklist[n].idVendor == idVendor &&
hid_rdesc_blacklist[n].idProduct == idProduct)
__usbhid_fixup_report_descriptor(hid_rdesc_blacklist[n].quirks,
rdesc, rsize);
/* runtime rdesc quirk entries handling */
for (n = 0; quirks_param[n] && n < MAX_USBHID_BOOT_QUIRKS; n++) {
m = sscanf(quirks_param[n], "0x%hx:0x%hx:0x%x",
&paramVendor, &paramProduct, &quirks);
if (m != 3)
printk(KERN_WARNING
"Could not parse HID quirk module param %s\n",
quirks_param[n]);
else if (paramVendor == idVendor && paramProduct == idProduct)
__usbhid_fixup_report_descriptor(quirks, rdesc, rsize);
}
}
...@@ -734,7 +734,6 @@ extern void hid_generic_exit(void); ...@@ -734,7 +734,6 @@ extern void hid_generic_exit(void);
u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct); u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct);
int usbhid_quirks_init(char **quirks_param); int usbhid_quirks_init(char **quirks_param);
void usbhid_quirks_exit(void); void usbhid_quirks_exit(void);
void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char **);
#ifdef CONFIG_HID_FF #ifdef CONFIG_HID_FF
int hid_ff_init(struct hid_device *hid); int hid_ff_init(struct hid_device *hid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册