diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-02-18 05:46:45 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2009-03-25 12:57:58 -0400 |
commit | 378a0ede126a2c59ab9ea1771de624521db5053e (patch) | |
tree | 08c81d94b190309c78cfc8a627edab0884d69a6c /drivers/hid/usbhid | |
parent | 0f6f1407e3e4a2cc4f602806d3c174473850f4da (diff) |
HID: fix USB HID devices after STD with autosuspend
This patch fixes a bug caused by reset_resume not changing the internal
status flags for a device that is resumed via reset_resume. To do so the
reset handlers, which correctly assume that a device is awake, can no longer
do all the work of reset_resume handling.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Tested-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index d8799a18a422..d79100a01b05 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -1330,6 +1330,15 @@ static int hid_post_reset(struct usb_interface *intf) | |||
1330 | return 0; | 1330 | return 0; |
1331 | } | 1331 | } |
1332 | 1332 | ||
1333 | static int hid_reset_resume(struct usb_interface *intf) | ||
1334 | { | ||
1335 | struct hid_device *hid = usb_get_intfdata(intf); | ||
1336 | struct usbhid_device *usbhid = hid->driver_data; | ||
1337 | |||
1338 | clear_bit(HID_REPORTED_IDLE, &usbhid->iofl); | ||
1339 | return hid_post_reset(intf); | ||
1340 | } | ||
1341 | |||
1333 | int usbhid_get_power(struct hid_device *hid) | 1342 | int usbhid_get_power(struct hid_device *hid) |
1334 | { | 1343 | { |
1335 | struct usbhid_device *usbhid = hid->driver_data; | 1344 | struct usbhid_device *usbhid = hid->driver_data; |
@@ -1359,7 +1368,7 @@ static struct usb_driver hid_driver = { | |||
1359 | #ifdef CONFIG_PM | 1368 | #ifdef CONFIG_PM |
1360 | .suspend = hid_suspend, | 1369 | .suspend = hid_suspend, |
1361 | .resume = hid_resume, | 1370 | .resume = hid_resume, |
1362 | .reset_resume = hid_post_reset, | 1371 | .reset_resume = hid_reset_resume, |
1363 | #endif | 1372 | #endif |
1364 | .pre_reset = hid_pre_reset, | 1373 | .pre_reset = hid_pre_reset, |
1365 | .post_reset = hid_post_reset, | 1374 | .post_reset = hid_post_reset, |