mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> CC: [email protected] Reported-by: Kevin Smith <[email protected]> Reported-and-tested-by: Simon Gerber <[email protected]> Reported-and-tested-by: Matteo Croce <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a85b4e7f44
commit
abf03184a3
1 changed files with 3 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ static struct usb_driver usb_serial_driver = {
|
|||
.suspend = usb_serial_suspend,
|
||||
.resume = usb_serial_resume,
|
||||
.no_dynamic_id = 1,
|
||||
.supports_autosuspend = 1,
|
||||
};
|
||||
|
||||
/* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead
|
||||
|
|
@ -1343,6 +1344,8 @@ int usb_serial_register(struct usb_serial_driver *driver)
|
|||
return -ENODEV;
|
||||
|
||||
fixup_generic(driver);
|
||||
if (driver->usb_driver)
|
||||
driver->usb_driver->supports_autosuspend = 1;
|
||||
|
||||
if (!driver->description)
|
||||
driver->description = driver->driver.name;
|
||||
|
|
|
|||
Loading…
Reference in a new issue