summaryrefslogtreecommitdiff
path: root/drivers/usb/core/quirks.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-11-15 23:57:58 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-17 01:04:22 +0300
commitc08512c761e7b9eaaab0e9167a389393f268e93c (patch)
tree6837bfb8e93915dae46a63a863275f90428f82f0 /drivers/usb/core/quirks.c
parentfcc4a01eb8661226e80632327673f67bf6a5840b (diff)
downloadlinux-c08512c761e7b9eaaab0e9167a389393f268e93c.tar.xz
USB: improve uses of usb_mark_last_busy
This patch (as1434) cleans up the uses of usb_mark_last_busy() in usbcore. The function will be called when a device is resumed and whenever a usage count is decremented. A call that was missing from the hub driver is added: A hub is used whenever one of its ports gets suspended (this prevents hubs from suspending immediately after their last child). In addition, the call to disable autosuspend support for new devices by default is moved from usb_detect_quirks() (where it doesn't really belong) into usb_new_device() along with all the other runtime-PM initializations. Finally, an extra pm_runtime_get_noresume() is added to prevent new devices from autosuspending while they are being registered. 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.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index e3531da16137..44c595432d6f 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -117,15 +117,6 @@ void usb_detect_quirks(struct usb_device *udev)
dev_dbg(&udev->dev, "USB quirks for this device: %x\n",
udev->quirks);
-#ifdef CONFIG_USB_SUSPEND
-
- /* By default, disable autosuspend for all devices. The hub driver
- * will enable it for hubs.
- */
- usb_disable_autosuspend(udev);
-
-#endif
-
/* For the present, all devices default to USB-PERSIST enabled */
#if 0 /* was: #ifdef CONFIG_PM */
/* Hubs are automatically enabled for USB-PERSIST */