summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-apple.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-06-27 00:04:24 +0200
committerJiri Kosina <jkosina@suse.cz>2008-10-14 23:50:56 +0200
commit93c10132a7ac160df3175b53f7ee857625412165 (patch)
tree64ea194ddd7791d44394bb2a918921a2906fe1ee /drivers/hid/hid-apple.c
parentfea6f1833b5bbff7066bcde1fa1141c9717bbad2 (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/hid-apple.c')
-rw-r--r--drivers/hid/hid-apple.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 2a68661fcea..f0b177844cf 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -309,6 +309,7 @@ static int apple_probe(struct hid_device *hdev,
{
unsigned long quirks = id->driver_data;
struct apple_sc *asc;
+ unsigned int connect_mask = HID_CONNECT_DEFAULT;
int ret;
/* return something else or move to hid layer? device will reside
@@ -328,18 +329,18 @@ static int apple_probe(struct hid_device *hdev,
hid_set_drvdata(hdev, asc);
- if (quirks & APPLE_HIDDEV)
- hdev->quirks |= HID_QUIRK_HIDDEV;
- if (quirks & APPLE_IGNORE_HIDINPUT)
- hdev->quirks |= HID_QUIRK_IGNORE_HIDINPUT;
-
ret = hid_parse(hdev);
if (ret) {
dev_err(&hdev->dev, "parse failed\n");
goto err_free;
}
- ret = hid_hw_start(hdev);
+ if (quirks & APPLE_HIDDEV)
+ connect_mask |= HID_CONNECT_HIDDEV_FORCE;
+ if (quirks & APPLE_IGNORE_HIDINPUT)
+ connect_mask &= ~HID_CONNECT_HIDINPUT;
+
+ ret = hid_hw_start(hdev, connect_mask);
if (ret) {
dev_err(&hdev->dev, "hw start failed\n");
goto err_free;