diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-07-01 22:11:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-27 11:58:50 -0700 |
commit | a8e7c5653562f88c0f5f53eac0a890c012655789 (patch) | |
tree | ba227138d408fdc73ccfc62ad8f75d912ece4baf /drivers/usb/core/usb.h | |
parent | 1cc8a25d5b680ff656927ffa9b66fae6b415b1d3 (diff) | |
download | linux-a8e7c5653562f88c0f5f53eac0a890c012655789.tar.bz2 |
usbcore: resume device resume recursion
This patch (as717b) removes the existing recursion in hub resume code:
Resuming a hub will no longer automatically resume the devices attached
to the hub.
At the same time, it adds one level of recursion: Suspending a USB
device will automatically suspend all the device's interfaces. Failure
at an intermediate stage will cause all the already-suspended interfaces
to be resumed. Attempts to suspend or resume an interface by itself will
do nothing, although they won't return an error. Thus the regular
system-suspend and system-resume procedures should continue to work as
before; only runtime PM will be affected.
The patch also removes the code that tests state of the interfaces
before suspending a device. It's no longer needed, since everything
gets suspended together.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r-- | drivers/usb/core/usb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 1d25ccac7832..cc42972b6bb0 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -30,6 +30,8 @@ extern void usb_major_cleanup(void); extern int usb_host_init(void); extern void usb_host_cleanup(void); +extern int usb_suspend_both(struct usb_device *udev, pm_message_t msg); +extern int usb_resume_both(struct usb_device *udev); extern int usb_port_suspend(struct usb_device *dev); extern int usb_port_resume(struct usb_device *dev); |