diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-11-12 16:19:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 12:59:53 -0500 |
commit | 9ac39f28b5237a629e41ccfc1f73d3a55723045c (patch) | |
tree | c161d5b62d11b6e73605a37b2562b90fff689d9e /drivers/usb/core/usb.c | |
parent | d4f373e57d3916814110968c5ea1155a8d972b5a (diff) |
USB: add asynchronous autosuspend/autoresume support
This patch (as1160b) adds support routines for asynchronous autosuspend
and autoresume, with accompanying documentation updates. There
already are several potential users of this interface, and others are
likely to arise as autosuspend support becomes more widespread.
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.c')
-rw-r--r-- | drivers/usb/core/usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 400fa4cc9a3..44f2fc750b6 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -402,6 +402,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, | |||
402 | #ifdef CONFIG_PM | 402 | #ifdef CONFIG_PM |
403 | mutex_init(&dev->pm_mutex); | 403 | mutex_init(&dev->pm_mutex); |
404 | INIT_DELAYED_WORK(&dev->autosuspend, usb_autosuspend_work); | 404 | INIT_DELAYED_WORK(&dev->autosuspend, usb_autosuspend_work); |
405 | INIT_WORK(&dev->autoresume, usb_autoresume_work); | ||
405 | dev->autosuspend_delay = usb_autosuspend_delay * HZ; | 406 | dev->autosuspend_delay = usb_autosuspend_delay * HZ; |
406 | dev->connect_time = jiffies; | 407 | dev->connect_time = jiffies; |
407 | dev->active_duration = -jiffies; | 408 | dev->active_duration = -jiffies; |