summaryrefslogtreecommitdiff
path: root/drivers/usb/core/quirks.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-02-20 20:00:53 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-23 23:03:46 (GMT)
commitb5e795f8df42936590ba9c606edc715fe3593284 (patch)
treeed0f132edc4d050407c4ba0b4582f167db86ba72 /drivers/usb/core/quirks.c
parentaa084f3efe5fb7e9c0d5b54ce704f0de69bbf27c (diff)
downloadlinux-fsl-qoriq-b5e795f8df42936590ba9c606edc715fe3593284.tar.xz
USB: make autosuspend delay a module parameter
This patch (as859) makes the default USB autosuspend delay a module parameter of usbcore. By setting the delay value at boot time, users will be able to prevent the system from autosuspending devices which for some reason can't handle it. The patch also stores the autosuspend delay as a per-device value. A later patch will allow the user to change the value, tailoring the delay for each individual device. A delay value of 0 will prevent autosuspend. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/quirks.c')
-rw-r--r--drivers/usb/core/quirks.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index ea0e48e..0e5c646 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -39,8 +39,10 @@ static const struct usb_device_id usb_quirk_list[] = {
static void usb_autosuspend_quirk(struct usb_device *udev)
{
- /* unbalanced resume to prevent autosuspends */
- usb_autoresume_device(udev);
+#ifdef CONFIG_USB_SUSPEND
+ /* disable autosuspend, but allow the user to re-enable it via sysfs */
+ udev->autosuspend_delay = 0;
+#endif
}
static const struct usb_device_id *find_id(struct usb_device *udev)