summaryrefslogtreecommitdiff
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2010-11-15 23:57:30 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-17 01:02:54 +0300
commit6ddf27cdbc218a412d7e993fdc08e30eec2042ce (patch)
tree393232ac1a8123961b62cb72cfc4b0bc617b333c /include/linux/usb.h
parent045cac6b3b067a9286dabfb789f67ae4f433f88b (diff)
downloadlinux-6ddf27cdbc218a412d7e993fdc08e30eec2042ce.tar.xz
USB: make usb_mark_last_busy use pm_runtime_mark_last_busy
Since the runtime-PM core already defines a .last_busy field in device.power, this patch uses it to replace the .last_busy field defined in usb_device and uses pm_runtime_mark_last_busy to implement usb_mark_last_busy. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Reviewed-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 35fe6ab222bb..7d22b3340a7f 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -20,6 +20,7 @@
#include <linux/completion.h> /* for struct completion */
#include <linux/sched.h> /* for current && schedule_timeout */
#include <linux/mutex.h> /* for struct mutex */
+#include <linux/pm_runtime.h> /* for runtime PM */
struct usb_device;
struct usb_driver;
@@ -407,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
- * @last_busy: time of last use
* @autosuspend_delay: in jiffies
* @connect_time: time device was first connected
* @do_remote_wakeup: remote wakeup should be enabled
@@ -481,7 +481,6 @@ struct usb_device {
unsigned long active_duration;
#ifdef CONFIG_PM
- unsigned long last_busy;
int autosuspend_delay;
unsigned long connect_time;
@@ -527,7 +526,7 @@ extern void usb_autopm_put_interface_no_suspend(struct usb_interface *intf);
static inline void usb_mark_last_busy(struct usb_device *udev)
{
- udev->last_busy = jiffies;
+ pm_runtime_mark_last_busy(&udev->dev);
}
#else