Gitweb: http://git.kernel.org/linus/378a0ede126a2c59ab9ea1771de624521db5053e Commit: 378a0ede126a2c59ab9ea1771de624521db5053e Parent: 0f6f1407e3e4a2cc4f602806d3c174473850f4da Author: Oliver Neukum <oliver@neukum.org> AuthorDate: Wed Feb 18 11:46:45 2009 +0100 Committer: Jiri Kosina <jkosina@suse.cz> CommitDate: Wed Mar 25 17:57:58 2009 +0100 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> --- 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 d8799a1..d79100a 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) return 0; } +static int hid_reset_resume(struct usb_interface *intf) +{ + struct hid_device *hid = usb_get_intfdata(intf); + struct usbhid_device *usbhid = hid->driver_data; + + clear_bit(HID_REPORTED_IDLE, &usbhid->iofl); + return hid_post_reset(intf); +} + int usbhid_get_power(struct hid_device *hid) { struct usbhid_device *usbhid = hid->driver_data; @@ -1359,7 +1368,7 @@ static struct usb_driver hid_driver = { #ifdef CONFIG_PM .suspend = hid_suspend, .resume = hid_resume, - .reset_resume = hid_post_reset, + .reset_resume = hid_reset_resume, #endif .pre_reset = hid_pre_reset, .post_reset = hid_post_reset, -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
