diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-06-26 18:04:24 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2008-10-14 17:50:56 -0400 |
commit | 93c10132a7ac160df3175b53f7ee857625412165 (patch) | |
tree | 64ea194ddd7791d44394bb2a918921a2906fe1ee /drivers/hid/usbhid/hiddev.c | |
parent | fea6f1833b5bbff7066bcde1fa1141c9717bbad2 (diff) |
HID: move connect quirks
Move connecting from usbhid to the hid layer and fix also hidp in
that manner.
This removes all the ignore/force hidinput/hiddev connecting quirks.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid/hiddev.c')
-rw-r--r-- | drivers/hid/usbhid/hiddev.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 842e9edb888e..babd65dd46ad 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c | |||
@@ -790,21 +790,23 @@ static struct usb_class_driver hiddev_class = { | |||
790 | /* | 790 | /* |
791 | * This is where hid.c calls us to connect a hid device to the hiddev driver | 791 | * This is where hid.c calls us to connect a hid device to the hiddev driver |
792 | */ | 792 | */ |
793 | int hiddev_connect(struct hid_device *hid) | 793 | int hiddev_connect(struct hid_device *hid, unsigned int force) |
794 | { | 794 | { |
795 | struct hiddev *hiddev; | 795 | struct hiddev *hiddev; |
796 | struct usbhid_device *usbhid = hid->driver_data; | 796 | struct usbhid_device *usbhid = hid->driver_data; |
797 | int i; | ||
798 | int retval; | 797 | int retval; |
799 | 798 | ||
800 | for (i = 0; i < hid->maxcollection; i++) | 799 | if (!force) { |
801 | if (hid->collection[i].type == | 800 | unsigned int i; |
802 | HID_COLLECTION_APPLICATION && | 801 | for (i = 0; i < hid->maxcollection; i++) |
803 | !IS_INPUT_APPLICATION(hid->collection[i].usage)) | 802 | if (hid->collection[i].type == |
804 | break; | 803 | HID_COLLECTION_APPLICATION && |
804 | !IS_INPUT_APPLICATION(hid->collection[i].usage)) | ||
805 | break; | ||
805 | 806 | ||
806 | if (i == hid->maxcollection && (hid->quirks & HID_QUIRK_HIDDEV) == 0) | 807 | if (i == hid->maxcollection) |
807 | return -1; | 808 | return -1; |
809 | } | ||
808 | 810 | ||
809 | if (!(hiddev = kzalloc(sizeof(struct hiddev), GFP_KERNEL))) | 811 | if (!(hiddev = kzalloc(sizeof(struct hiddev), GFP_KERNEL))) |
810 | return -1; | 812 | return -1; |