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>
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) {
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));
}
if (rc_lock)
usb_unlock_device(hid_to_usb_dev(hid));
}
static int proc_resetdevice(struct dev_state *ps)
{
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)
}
static int proc_setintf(struct dev_state *ps, void __user *arg)
- status = usb_reset_composite_device(udev, NULL);
+ status = usb_reset_composite_device(udev);
}
usb_unlock_device(udev);
}
usb_unlock_device(udev);
dev_dbg (hub_dev, "resetting for error %d\n",
hub->error);
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);
if (ret) {
dev_dbg (hub_dev,
"error resetting hub: %d\n", ret);
/**
* usb_reset_composite_device - warn interface drivers and perform a USB port reset
* @udev: device to reset (not in SUSPENDED or NOTATTACHED state)
/**
* 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
*
* Warns all drivers bound to registered interfaces (using their pre_reset
* method), performs the port reset, and then lets the drivers know that
* For calls that might not occur during probe(), drivers should lock
* the device using usb_lock_device_for_reset().
*/
* 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)
/* Prevent autosuspend during the reset */
usb_autoresume_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];
if (config) {
for (i = 0; i < config->desc.bNumInterfaces; ++i) {
struct usb_interface *cintf = config->interface[i];
result = -EIO;
US_DEBUGP("No reset during disconnect\n");
} else {
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);
}
US_DEBUGP("usb_reset_composite_device returns %d\n",
result);
}
/* USB port reset for device reinitialization */
extern int usb_reset_device(struct usb_device *dev);
/* 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);
extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);