usbcore: remove unused argument in autosuspend
Thanks to several earlier patches, usb_autosuspend_device() and
usb_autoresume_device() are never called with a second argument other
than 1. This patch (as819) removes the now-redundant argument.
It also consolidates some common code between those two routines,
putting it into a new subroutine called usb_autopm_do_device(). And
it includes a sizable kerneldoc update for the affected functions.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index e46d38b..0ce393e 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1234,7 +1234,7 @@
if (udev->parent) {
usb_pm_lock(udev);
if (!udev->discon_suspended)
- usb_autosuspend_device(udev->parent, 1);
+ usb_autosuspend_device(udev->parent);
usb_pm_unlock(udev);
}
@@ -1368,7 +1368,7 @@
/* Increment the parent's count of unsuspended children */
if (udev->parent)
- usb_autoresume_device(udev->parent, 1);
+ usb_autoresume_device(udev->parent);
exit:
module_put(THIS_MODULE);
@@ -1881,12 +1881,12 @@
usb_lock_device(udev);
if (udev->state == USB_STATE_SUSPENDED) {
dev_dbg(&udev->dev, "usb %sresume\n", "wakeup-");
- status = usb_autoresume_device(udev, 1);
+ status = usb_autoresume_device(udev);
/* Give the interface drivers a chance to do something,
* then autosuspend the device again. */
if (status == 0)
- usb_autosuspend_device(udev, 1);
+ usb_autosuspend_device(udev);
}
usb_unlock_device(udev);
return status;
@@ -3099,7 +3099,7 @@
}
/* Prevent autosuspend during the reset */
- usb_autoresume_device(udev, 1);
+ usb_autoresume_device(udev);
if (iface && iface->condition != USB_INTERFACE_BINDING)
iface = NULL;
@@ -3142,7 +3142,7 @@
}
}
- usb_autosuspend_device(udev, 1);
+ usb_autosuspend_device(udev);
return ret;
}
EXPORT_SYMBOL(usb_reset_composite_device);