diff options
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index f9e4445d5b53..cfbd2bb8fa2c 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -398,6 +398,7 @@ struct usb_device { | |||
398 | struct delayed_work autosuspend; /* for delayed autosuspends */ | 398 | struct delayed_work autosuspend; /* for delayed autosuspends */ |
399 | struct mutex pm_mutex; /* protects PM operations */ | 399 | struct mutex pm_mutex; /* protects PM operations */ |
400 | 400 | ||
401 | unsigned long last_busy; /* time of last use */ | ||
401 | int autosuspend_delay; /* in jiffies */ | 402 | int autosuspend_delay; /* in jiffies */ |
402 | 403 | ||
403 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 404 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
@@ -443,6 +444,11 @@ static inline void usb_autopm_disable(struct usb_interface *intf) | |||
443 | usb_autopm_set_interface(intf); | 444 | usb_autopm_set_interface(intf); |
444 | } | 445 | } |
445 | 446 | ||
447 | static inline void usb_mark_last_busy(struct usb_device *udev) | ||
448 | { | ||
449 | udev->last_busy = jiffies; | ||
450 | } | ||
451 | |||
446 | #else | 452 | #else |
447 | 453 | ||
448 | static inline int usb_autopm_set_interface(struct usb_interface *intf) | 454 | static inline int usb_autopm_set_interface(struct usb_interface *intf) |
@@ -457,6 +463,8 @@ static inline void usb_autopm_enable(struct usb_interface *intf) | |||
457 | { } | 463 | { } |
458 | static inline void usb_autopm_disable(struct usb_interface *intf) | 464 | static inline void usb_autopm_disable(struct usb_interface *intf) |
459 | { } | 465 | { } |
466 | static inline void usb_mark_last_busy(struct usb_device *udev) | ||
467 | { } | ||
460 | #endif | 468 | #endif |
461 | 469 | ||
462 | /*-------------------------------------------------------------------------*/ | 470 | /*-------------------------------------------------------------------------*/ |