USB: export autosuspend delay in sysfs
This patch (as861) adds sysfs attributes to expose the autosuspend delay value for each USB device. If the user changes the delay from 0 (no autosuspend) to a positive value, an autosuspend is attempted. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
dfa87c824a
commit
19c262391c
@ -66,11 +66,13 @@ static inline void usb_pm_unlock(struct usb_device *udev) {}
|
||||
#ifdef CONFIG_USB_SUSPEND
|
||||
|
||||
extern void usb_autosuspend_device(struct usb_device *udev);
|
||||
extern void usb_try_autosuspend_device(struct usb_device *udev);
|
||||
extern int usb_autoresume_device(struct usb_device *udev);
|
||||
|
||||
#else
|
||||
|
||||
#define usb_autosuspend_device(udev) do {} while (0)
|
||||
#define usb_autosuspend_device(udev) do {} while (0)
|
||||
#define usb_try_autosuspend_device(udev) do {} while (0)
|
||||
static inline int usb_autoresume_device(struct usb_device *udev)
|
||||
{
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user