USB: remove interface parameter of usb_reset_composite_device
authorMing Lei <tom.leiming@gmail.com>
Sun, 15 Jun 2008 01:42:02 +0000 (09:42 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Jul 2008 22:16:32 +0000 (15:16 -0700)
From the current implementation of usb_reset_composite_device
function, the iface parameter is no longer useful. This function
doesn't do something special for the iface usb_interface,compared
with other interfaces in the usb_device. So remove the parameter
and fix the related caller.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hid/usbhid/hid-core.c
drivers/usb/core/devio.c
drivers/usb/core/hub.c
drivers/usb/storage/transport.c
include/linux/usb.h

index 01427c51c7cc71b602d4df4535ab8b745e65a791..69fa79b6b51c82da8daaf72e2e72ad351ec2c172 100644 (file)
@@ -122,7 +122,7 @@ static void hid_reset(struct work_struct *work)
                dev_dbg(&usbhid->intf->dev, "resetting device\n");
                rc = rc_lock = usb_lock_device_for_reset(hid_to_usb_dev(hid), usbhid->intf);
                if (rc_lock >= 0) {
-                       rc = usb_reset_composite_device(hid_to_usb_dev(hid), usbhid->intf);
+                       rc = usb_reset_composite_device(hid_to_usb_dev(hid));
                        if (rc_lock)
                                usb_unlock_device(hid_to_usb_dev(hid));
                }
index 7bee9c18b3bc7372f4b2b8380ad9466f61aca0ce..bc1cce5cf758e4e2dd129728bafbc4b81985434e 100644 (file)
@@ -872,7 +872,7 @@ static int proc_connectinfo(struct dev_state *ps, void __user *arg)
 
 static int proc_resetdevice(struct dev_state *ps)
 {
-       return usb_reset_composite_device(ps->dev, NULL);
+       return usb_reset_composite_device(ps->dev);
 }
 
 static int proc_setintf(struct dev_state *ps, void __user *arg)
index 3251120b414e135285110d3b890c266a06d8ff54..207c33d369bee80f0d88b302dbb00475defe7194 100644 (file)
@@ -2712,7 +2712,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
 #endif
 
                } else {
-                       status = usb_reset_composite_device(udev, NULL);
+                       status = usb_reset_composite_device(udev);
                }
                usb_unlock_device(udev);
 
@@ -2940,7 +2940,7 @@ static void hub_events(void)
                        dev_dbg (hub_dev, "resetting for error %d\n",
                                hub->error);
 
-                       ret = usb_reset_composite_device(hdev, intf);
+                       ret = usb_reset_composite_device(hdev);
                        if (ret) {
                                dev_dbg (hub_dev,
                                        "error resetting hub: %d\n", ret);
@@ -3355,7 +3355,6 @@ EXPORT_SYMBOL_GPL(usb_reset_device);
 /**
  * usb_reset_composite_device - warn interface drivers and perform a USB port reset
  * @udev: device to reset (not in SUSPENDED or NOTATTACHED state)
- * @iface: interface bound to the driver making the request (optional)
  *
  * Warns all drivers bound to registered interfaces (using their pre_reset
  * method), performs the port reset, and then lets the drivers know that
@@ -3368,8 +3367,7 @@ EXPORT_SYMBOL_GPL(usb_reset_device);
  * For calls that might not occur during probe(), drivers should lock
  * the device using usb_lock_device_for_reset().
  */
-int usb_reset_composite_device(struct usb_device *udev,
-               struct usb_interface *iface)
+int usb_reset_composite_device(struct usb_device *udev)
 {
        int ret;
        int i;
@@ -3385,9 +3383,6 @@ int usb_reset_composite_device(struct usb_device *udev,
        /* Prevent autosuspend during the reset */
        usb_autoresume_device(udev);
 
-       if (iface && iface->condition != USB_INTERFACE_BINDING)
-               iface = NULL;
-
        if (config) {
                for (i = 0; i < config->desc.bNumInterfaces; ++i) {
                        struct usb_interface *cintf = config->interface[i];
index 08d3a13fec2cd14609c5b860f71654d3a1abe389..670e4cbd1f06b8e09be29d1ae5d63fb3a2f6593b 100644 (file)
@@ -1172,8 +1172,7 @@ int usb_stor_port_reset(struct us_data *us)
                        result = -EIO;
                        US_DEBUGP("No reset during disconnect\n");
                } else {
-                       result = usb_reset_composite_device(
-                                       us->pusb_dev, us->pusb_intf);
+                       result = usb_reset_composite_device(us->pusb_dev);
                        US_DEBUGP("usb_reset_composite_device returns %d\n",
                                        result);
                }
index 8429d08bd2fd7ac0d2c62b264677d33a9c2788d5..c74cc64bddc85fdc7c6cd5aec6642879bf74d0c5 100644 (file)
@@ -497,8 +497,7 @@ extern int usb_lock_device_for_reset(struct usb_device *udev,
 
 /* USB port reset for device reinitialization */
 extern int usb_reset_device(struct usb_device *dev);
-extern int usb_reset_composite_device(struct usb_device *dev,
-               struct usb_interface *iface);
+extern int usb_reset_composite_device(struct usb_device *dev);
 
 extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);