diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-11-20 11:38:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-01 17:25:53 -0500 |
commit | 94fcda1f8ab5e0cacc381c5ca1cc9aa6ad523576 (patch) | |
tree | ffdcc2e33bce1343ce7e57e04e1beca190cf4201 /drivers/usb/core/hub.c | |
parent | ee49fb5dc89d34f1794ac9362fa97c1a640f7ddd (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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index e46d38b18249..0ce393eb3c4b 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1234,7 +1234,7 @@ void usb_disconnect(struct usb_device **pdev) | |||
1234 | if (udev->parent) { | 1234 | if (udev->parent) { |
1235 | usb_pm_lock(udev); | 1235 | usb_pm_lock(udev); |
1236 | if (!udev->discon_suspended) | 1236 | if (!udev->discon_suspended) |
1237 | usb_autosuspend_device(udev->parent, 1); | 1237 | usb_autosuspend_device(udev->parent); |
1238 | usb_pm_unlock(udev); | 1238 | usb_pm_unlock(udev); |
1239 | } | 1239 | } |
1240 | 1240 | ||
@@ -1368,7 +1368,7 @@ static int __usb_new_device(void *void_data) | |||
1368 | 1368 | ||
1369 | /* Increment the parent's count of unsuspended children */ | 1369 | /* Increment the parent's count of unsuspended children */ |
1370 | if (udev->parent) | 1370 | if (udev->parent) |
1371 | usb_autoresume_device(udev->parent, 1); | 1371 | usb_autoresume_device(udev->parent); |
1372 | 1372 | ||
1373 | exit: | 1373 | exit: |
1374 | module_put(THIS_MODULE); | 1374 | module_put(THIS_MODULE); |
@@ -1881,12 +1881,12 @@ static int remote_wakeup(struct usb_device *udev) | |||
1881 | usb_lock_device(udev); | 1881 | usb_lock_device(udev); |
1882 | if (udev->state == USB_STATE_SUSPENDED) { | 1882 | if (udev->state == USB_STATE_SUSPENDED) { |
1883 | dev_dbg(&udev->dev, "usb %sresume\n", "wakeup-"); | 1883 | dev_dbg(&udev->dev, "usb %sresume\n", "wakeup-"); |
1884 | status = usb_autoresume_device(udev, 1); | 1884 | status = usb_autoresume_device(udev); |
1885 | 1885 | ||
1886 | /* Give the interface drivers a chance to do something, | 1886 | /* Give the interface drivers a chance to do something, |
1887 | * then autosuspend the device again. */ | 1887 | * then autosuspend the device again. */ |
1888 | if (status == 0) | 1888 | if (status == 0) |
1889 | usb_autosuspend_device(udev, 1); | 1889 | usb_autosuspend_device(udev); |
1890 | } | 1890 | } |
1891 | usb_unlock_device(udev); | 1891 | usb_unlock_device(udev); |
1892 | return status; | 1892 | return status; |
@@ -3099,7 +3099,7 @@ int usb_reset_composite_device(struct usb_device *udev, | |||
3099 | } | 3099 | } |
3100 | 3100 | ||
3101 | /* Prevent autosuspend during the reset */ | 3101 | /* Prevent autosuspend during the reset */ |
3102 | usb_autoresume_device(udev, 1); | 3102 | usb_autoresume_device(udev); |
3103 | 3103 | ||
3104 | if (iface && iface->condition != USB_INTERFACE_BINDING) | 3104 | if (iface && iface->condition != USB_INTERFACE_BINDING) |
3105 | iface = NULL; | 3105 | iface = NULL; |
@@ -3142,7 +3142,7 @@ int usb_reset_composite_device(struct usb_device *udev, | |||
3142 | } | 3142 | } |
3143 | } | 3143 | } |
3144 | 3144 | ||
3145 | usb_autosuspend_device(udev, 1); | 3145 | usb_autosuspend_device(udev); |
3146 | return ret; | 3146 | return ret; |
3147 | } | 3147 | } |
3148 | EXPORT_SYMBOL(usb_reset_composite_device); | 3148 | EXPORT_SYMBOL(usb_reset_composite_device); |