diff options
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index e221b0d1f667..b2baeaeba9be 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -1009,20 +1009,22 @@ static int hid_resume(struct usb_interface *intf) | |||
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | /* Treat USB reset pretty much the same as suspend/resume */ | 1011 | /* Treat USB reset pretty much the same as suspend/resume */ |
1012 | static void hid_pre_reset(struct usb_interface *intf) | 1012 | static int hid_pre_reset(struct usb_interface *intf) |
1013 | { | 1013 | { |
1014 | /* FIXME: What if the interface is already suspended? */ | 1014 | /* FIXME: What if the interface is already suspended? */ |
1015 | hid_suspend(intf, PMSG_ON); | 1015 | hid_suspend(intf, PMSG_ON); |
1016 | return 0; | ||
1016 | } | 1017 | } |
1017 | 1018 | ||
1018 | static void hid_post_reset(struct usb_interface *intf, int reset_resume) | 1019 | /* Same routine used for post_reset and reset_resume */ |
1020 | static int hid_post_reset(struct usb_interface *intf) | ||
1019 | { | 1021 | { |
1020 | struct usb_device *dev = interface_to_usbdev (intf); | 1022 | struct usb_device *dev = interface_to_usbdev (intf); |
1021 | 1023 | ||
1022 | hid_set_idle(dev, intf->cur_altsetting->desc.bInterfaceNumber, 0, 0); | 1024 | hid_set_idle(dev, intf->cur_altsetting->desc.bInterfaceNumber, 0, 0); |
1023 | /* FIXME: Any more reinitialization needed? */ | 1025 | /* FIXME: Any more reinitialization needed? */ |
1024 | 1026 | ||
1025 | hid_resume(intf); | 1027 | return hid_resume(intf); |
1026 | } | 1028 | } |
1027 | 1029 | ||
1028 | static struct usb_device_id hid_usb_ids [] = { | 1030 | static struct usb_device_id hid_usb_ids [] = { |
@@ -1039,6 +1041,7 @@ static struct usb_driver hid_driver = { | |||
1039 | .disconnect = hid_disconnect, | 1041 | .disconnect = hid_disconnect, |
1040 | .suspend = hid_suspend, | 1042 | .suspend = hid_suspend, |
1041 | .resume = hid_resume, | 1043 | .resume = hid_resume, |
1044 | .reset_resume = hid_post_reset, | ||
1042 | .pre_reset = hid_pre_reset, | 1045 | .pre_reset = hid_pre_reset, |
1043 | .post_reset = hid_post_reset, | 1046 | .post_reset = hid_post_reset, |
1044 | .id_table = hid_usb_ids, | 1047 | .id_table = hid_usb_ids, |