diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-30 11:49:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-30 11:49:12 -0700 |
commit | 52e8e19b019ca7ad6951d7a39b78d24b198238bc (patch) | |
tree | 5bc9dd4f4df1630aea1e0d7b42ba1673cdf810c7 /drivers/usb/core/hub.c | |
parent | 908c3d8c005f19f807c67105cede0bd2c352a8e6 (diff) | |
parent | 61fbeba11c553c489ba5284c0ed67067dc7b7c0f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: prevent autosuspend during hub initialization
USB: Unusual dev for the "Kyocera / Contax SL300R T*" digital camera.
USB: usbtmc: Use explicit unsigned type for input buffer instead of char*
USB: fix crash when URBs are unlinked after the device is gone
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 9b3f16bd12c..b19cbfcd51d 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -659,6 +659,9 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) PREPARE_DELAYED_WORK(&hub->init_work, hub_init_func2); schedule_delayed_work(&hub->init_work, msecs_to_jiffies(delay)); + + /* Suppress autosuspend until init is done */ + to_usb_interface(hub->intfdev)->pm_usage_cnt = 1; return; /* Continues at init2: below */ } else { hub_power_on(hub, true); @@ -1429,6 +1432,7 @@ void usb_disconnect(struct usb_device **pdev) */ dev_dbg (&udev->dev, "unregistering device\n"); usb_disable_device(udev, 0); + usb_hcd_synchronize_unlinks(udev); usb_unlock_device(udev); |