提交 abf03184 编写于 作者: A Alan Stern 提交者: Greg Kroah-Hartman

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: NAlan Stern <stern@rowland.harvard.edu>
CC: stable@kernel.org
Reported-by: NKevin Smith <thirdwiggin@gmail.com>
Reported-and-tested-by: NSimon Gerber <gesimu@gmail.com>
Reported-and-tested-by: NMatteo Croce <matteo@openwrt.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 a85b4e7f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册