aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/usbhid/hid-core.c2
-rw-r--r--drivers/usb/core/devio.c2
-rw-r--r--drivers/usb/core/hub.c11
-rw-r--r--drivers/usb/storage/transport.c3
4 files changed, 6 insertions, 12 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 01427c51c7cc..69fa79b6b51c 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -122,7 +122,7 @@ static void hid_reset(struct work_struct *work)
122 dev_dbg(&usbhid->intf->dev, "resetting device\n"); 122 dev_dbg(&usbhid->intf->dev, "resetting device\n");
123 rc = rc_lock = usb_lock_device_for_reset(hid_to_usb_dev(hid), usbhid->intf); 123 rc = rc_lock = usb_lock_device_for_reset(hid_to_usb_dev(hid), usbhid->intf);
124 if (rc_lock >= 0) { 124 if (rc_lock >= 0) {
125 rc = usb_reset_composite_device(hid_to_usb_dev(hid), usbhid->intf); 125 rc = usb_reset_composite_device(hid_to_usb_dev(hid));
126 if (rc_lock) 126 if (rc_lock)
127 usb_unlock_device(hid_to_usb_dev(hid)); 127 usb_unlock_device(hid_to_usb_dev(hid));
128 } 128 }
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 7bee9c18b3bc..bc1cce5cf758 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -872,7 +872,7 @@ static int proc_connectinfo(struct dev_state *ps, void __user *arg)
872 872
873static int proc_resetdevice(struct dev_state *ps) 873static int proc_resetdevice(struct dev_state *ps)
874{ 874{
875 return usb_reset_composite_device(ps->dev, NULL); 875 return usb_reset_composite_device(ps->dev);
876} 876}
877 877
878static int proc_setintf(struct dev_state *ps, void __user *arg) 878static int proc_setintf(struct dev_state *ps, void __user *arg)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 3251120b414e..207c33d369be 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2712,7 +2712,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
2712#endif 2712#endif
2713 2713
2714 } else { 2714 } else {
2715 status = usb_reset_composite_device(udev, NULL); 2715 status = usb_reset_composite_device(udev);
2716 } 2716 }
2717 usb_unlock_device(udev); 2717 usb_unlock_device(udev);
2718 2718
@@ -2940,7 +2940,7 @@ static void hub_events(void)
2940 dev_dbg (hub_dev, "resetting for error %d\n", 2940 dev_dbg (hub_dev, "resetting for error %d\n",
2941 hub->error); 2941 hub->error);
2942 2942
2943 ret = usb_reset_composite_device(hdev, intf); 2943 ret = usb_reset_composite_device(hdev);
2944 if (ret) { 2944 if (ret) {
2945 dev_dbg (hub_dev, 2945 dev_dbg (hub_dev,
2946 "error resetting hub: %d\n", ret); 2946 "error resetting hub: %d\n", ret);
@@ -3355,7 +3355,6 @@ EXPORT_SYMBOL_GPL(usb_reset_device);
3355/** 3355/**
3356 * usb_reset_composite_device - warn interface drivers and perform a USB port reset 3356 * usb_reset_composite_device - warn interface drivers and perform a USB port reset
3357 * @udev: device to reset (not in SUSPENDED or NOTATTACHED state) 3357 * @udev: device to reset (not in SUSPENDED or NOTATTACHED state)
3358 * @iface: interface bound to the driver making the request (optional)
3359 * 3358 *
3360 * Warns all drivers bound to registered interfaces (using their pre_reset 3359 * Warns all drivers bound to registered interfaces (using their pre_reset
3361 * method), performs the port reset, and then lets the drivers know that 3360 * method), performs the port reset, and then lets the drivers know that
@@ -3368,8 +3367,7 @@ EXPORT_SYMBOL_GPL(usb_reset_device);
3368 * For calls that might not occur during probe(), drivers should lock 3367 * For calls that might not occur during probe(), drivers should lock
3369 * the device using usb_lock_device_for_reset(). 3368 * the device using usb_lock_device_for_reset().
3370 */ 3369 */
3371int usb_reset_composite_device(struct usb_device *udev, 3370int usb_reset_composite_device(struct usb_device *udev)
3372 struct usb_interface *iface)
3373{ 3371{
3374 int ret; 3372 int ret;
3375 int i; 3373 int i;
@@ -3385,9 +3383,6 @@ int usb_reset_composite_device(struct usb_device *udev,
3385 /* Prevent autosuspend during the reset */ 3383 /* Prevent autosuspend during the reset */
3386 usb_autoresume_device(udev); 3384 usb_autoresume_device(udev);
3387 3385
3388 if (iface && iface->condition != USB_INTERFACE_BINDING)
3389 iface = NULL;
3390
3391 if (config) { 3386 if (config) {
3392 for (i = 0; i < config->desc.bNumInterfaces; ++i) { 3387 for (i = 0; i < config->desc.bNumInterfaces; ++i) {
3393 struct usb_interface *cintf = config->interface[i]; 3388 struct usb_interface *cintf = config->interface[i];
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index 08d3a13fec2c..670e4cbd1f06 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -1172,8 +1172,7 @@ int usb_stor_port_reset(struct us_data *us)
1172 result = -EIO; 1172 result = -EIO;
1173 US_DEBUGP("No reset during disconnect\n"); 1173 US_DEBUGP("No reset during disconnect\n");
1174 } else { 1174 } else {
1175 result = usb_reset_composite_device( 1175 result = usb_reset_composite_device(us->pusb_dev);
1176 us->pusb_dev, us->pusb_intf);
1177 US_DEBUGP("usb_reset_composite_device returns %d\n", 1176 US_DEBUGP("usb_reset_composite_device returns %d\n",
1178 result); 1177 result);
1179 } 1178 }