summaryrefslogtreecommitdiff
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-11-15 23:57:51 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-17 01:03:41 +0300
commitfcc4a01eb8661226e80632327673f67bf6a5840b (patch)
treedc05c200ccfac2daad6d1efe413ae6fa92f1638d /drivers/usb/core/hub.c
parent6ddf27cdbc218a412d7e993fdc08e30eec2042ce (diff)
downloadlinux-fcc4a01eb8661226e80632327673f67bf6a5840b.tar.xz
USB: use the runtime-PM autosuspend implementation
This patch (as1428) converts USB over to the new runtime-PM core autosuspend framework. One slightly awkward aspect of the conversion is that USB devices will now have two suspend-delay attributes: the old power/autosuspend file and the new power/autosuspend_delay_ms file. One expresses the delay time in seconds and the other in milliseconds, but otherwise they do the same thing. The old attribute can be deprecated and then removed eventually. 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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 7c2405eccc4b..fdb62ca10d86 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1803,6 +1803,7 @@ int usb_new_device(struct usb_device *udev)
/* Tell the runtime-PM framework the device is active */
pm_runtime_set_active(&udev->dev);
+ pm_runtime_use_autosuspend(&udev->dev);
pm_runtime_enable(&udev->dev);
err = usb_enumerate_device(udev); /* Read descriptors */