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/hid-apple.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/hid-apple.c')
-rw-r--r-- | drivers/hid/hid-apple.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index 2a68661fcea8..f0b177844cf8 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, | |||
309 | { | 309 | { |
310 | unsigned long quirks = id->driver_data; | 310 | unsigned long quirks = id->driver_data; |
311 | struct apple_sc *asc; | 311 | struct apple_sc *asc; |
312 | unsigned int connect_mask = HID_CONNECT_DEFAULT; | ||
312 | int ret; | 313 | int ret; |
313 | 314 | ||
314 | /* return something else or move to hid layer? device will reside | 315 | /* return something else or move to hid layer? device will reside |
@@ -328,18 +329,18 @@ static int apple_probe(struct hid_device *hdev, | |||
328 | 329 | ||
329 | hid_set_drvdata(hdev, asc); | 330 | hid_set_drvdata(hdev, asc); |
330 | 331 | ||
331 | if (quirks & APPLE_HIDDEV) | ||
332 | hdev->quirks |= HID_QUIRK_HIDDEV; | ||
333 | if (quirks & APPLE_IGNORE_HIDINPUT) | ||
334 | hdev->quirks |= HID_QUIRK_IGNORE_HIDINPUT; | ||
335 | |||
336 | ret = hid_parse(hdev); | 332 | ret = hid_parse(hdev); |
337 | if (ret) { | 333 | if (ret) { |
338 | dev_err(&hdev->dev, "parse failed\n"); | 334 | dev_err(&hdev->dev, "parse failed\n"); |
339 | goto err_free; | 335 | goto err_free; |
340 | } | 336 | } |
341 | 337 | ||
342 | ret = hid_hw_start(hdev); | 338 | if (quirks & APPLE_HIDDEV) |
339 | connect_mask |= HID_CONNECT_HIDDEV_FORCE; | ||
340 | if (quirks & APPLE_IGNORE_HIDINPUT) | ||
341 | connect_mask &= ~HID_CONNECT_HIDINPUT; | ||
342 | |||
343 | ret = hid_hw_start(hdev, connect_mask); | ||
343 | if (ret) { | 344 | if (ret) { |
344 | dev_err(&hdev->dev, "hw start failed\n"); | 345 | dev_err(&hdev->dev, "hw start failed\n"); |
345 | goto err_free; | 346 | goto err_free; |