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>
This commit is contained in:
Alan Stern
2010-11-15 15:57:51 -05:00
committed by Greg Kroah-Hartman
parent 6ddf27cdbc
commit fcc4a01eb8
8 changed files with 70 additions and 166 deletions

View File

@@ -408,7 +408,6 @@ struct usb_tt;
* @quirks: quirks of the whole device
* @urbnum: number of URBs submitted for the whole device
* @active_duration: total time device is not suspended
* @autosuspend_delay: in jiffies
* @connect_time: time device was first connected
* @do_remote_wakeup: remote wakeup should be enabled
* @reset_resume: needs reset instead of resume
@@ -481,7 +480,6 @@ struct usb_device {
unsigned long active_duration;
#ifdef CONFIG_PM
int autosuspend_delay;
unsigned long connect_time;
unsigned do_remote_wakeup:1;