HID: move apple quirks
Move them from the core code to a separate driver. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
@ -683,27 +683,6 @@ static void hidp_close(struct hid_device *hid)
|
||||
{
|
||||
}
|
||||
|
||||
static const struct {
|
||||
__u16 idVendor;
|
||||
__u16 idProduct;
|
||||
unsigned quirks;
|
||||
} hidp_blacklist[] = {
|
||||
/* Apple wireless Mighty Mouse */
|
||||
{ 0x05ac, 0x030c, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
|
||||
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
||||
static void hidp_setup_quirks(struct hid_device *hid)
|
||||
{
|
||||
unsigned int n;
|
||||
|
||||
for (n = 0; hidp_blacklist[n].idVendor; n++)
|
||||
if (hidp_blacklist[n].idVendor == le16_to_cpu(hid->vendor) &&
|
||||
hidp_blacklist[n].idProduct == le16_to_cpu(hid->product))
|
||||
hid->quirks = hidp_blacklist[n].quirks;
|
||||
}
|
||||
|
||||
static int hidp_parse(struct hid_device *hid)
|
||||
{
|
||||
struct hidp_session *session = hid->driver_data;
|
||||
@ -729,7 +708,6 @@ static int hidp_parse(struct hid_device *hid)
|
||||
|
||||
session->req = NULL;
|
||||
|
||||
hidp_setup_quirks(hid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user