diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2010-11-29 10:17:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-30 13:28:07 -0500 |
commit | abf03184a31a3286fc0ab30f838ddee8ba9f9b7b (patch) | |
tree | 872111596aa69ff687fb4881cc9aa4c911d278bb /drivers/usb/serial/usb-serial.c | |
parent | a85b4e7f4481c5a1ca89fa63c9c871151965075e (diff) |
USB: fix autosuspend bug in usb-serial
This patch (as1437) fixes a bug in the usb-serial autosuspend
handling. Since the usb-serial core now has autosuspend support, it
must set the .supports_autosuspend member in every serial driver it
registers. Otherwise the usb_autopm_get_interface() call won't work.
This fixes Bugzilla #23012.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: stable@kernel.org
Reported-by: Kevin Smith <thirdwiggin@gmail.com>
Reported-and-tested-by: Simon Gerber <gesimu@gmail.com>
Reported-and-tested-by: Matteo Croce <matteo@openwrt.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 861223f2af6e..6954de50c0ff 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -51,6 +51,7 @@ static struct usb_driver usb_serial_driver = { | |||
51 | .suspend = usb_serial_suspend, | 51 | .suspend = usb_serial_suspend, |
52 | .resume = usb_serial_resume, | 52 | .resume = usb_serial_resume, |
53 | .no_dynamic_id = 1, | 53 | .no_dynamic_id = 1, |
54 | .supports_autosuspend = 1, | ||
54 | }; | 55 | }; |
55 | 56 | ||
56 | /* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead | 57 | /* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead |
@@ -1343,6 +1344,8 @@ int usb_serial_register(struct usb_serial_driver *driver) | |||
1343 | return -ENODEV; | 1344 | return -ENODEV; |
1344 | 1345 | ||
1345 | fixup_generic(driver); | 1346 | fixup_generic(driver); |
1347 | if (driver->usb_driver) | ||
1348 | driver->usb_driver->supports_autosuspend = 1; | ||
1346 | 1349 | ||
1347 | if (!driver->description) | 1350 | if (!driver->description) |
1348 | driver->description = driver->driver.name; | 1351 | driver->description = driver->driver.name; |