aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-11-20 11:38:46 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 14:25:53 -0800
commit94fcda1f8ab5e0cacc381c5ca1cc9aa6ad523576 (patch)
treeffdcc2e33bce1343ce7e57e04e1beca190cf4201 /drivers/usb/core/hub.c
parentee49fb5dc89d34f1794ac9362fa97c1a640f7ddd (diff)
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>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index e46d38b1824..0ce393eb3c4 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1234,7 +1234,7 @@ void usb_disconnect(struct usb_device **pdev)
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 @@ static int __usb_new_device(void *void_data)
/* 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 @@ static int remote_wakeup(struct usb_device *udev)
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 @@ int usb_reset_composite_device(struct usb_device *udev,
}
/* 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 @@ int usb_reset_composite_device(struct usb_device *udev,
}
}
- usb_autosuspend_device(udev, 1);
+ usb_autosuspend_device(udev);
return ret;
}
EXPORT_SYMBOL(usb_reset_composite_device);