aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r--drivers/usb/serial/usb-serial.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 7a2177c79bde..6afd8e848117 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -52,6 +52,7 @@ static struct usb_driver usb_serial_driver = {
52 .suspend = usb_serial_suspend, 52 .suspend = usb_serial_suspend,
53 .resume = usb_serial_resume, 53 .resume = usb_serial_resume,
54 .no_dynamic_id = 1, 54 .no_dynamic_id = 1,
55 .supports_autosuspend = 1,
55}; 56};
56 57
57/* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead 58/* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead
@@ -1334,6 +1335,12 @@ int usb_serial_register(struct usb_serial_driver *driver)
1334 1335
1335 if (!driver->description) 1336 if (!driver->description)
1336 driver->description = driver->driver.name; 1337 driver->description = driver->driver.name;
1338 if (!driver->usb_driver) {
1339 WARN(1, "Serial driver %s has no usb_driver\n",
1340 driver->description);
1341 return -EINVAL;
1342 }
1343 driver->usb_driver->supports_autosuspend = 1;
1337 1344
1338 /* Add this device to our list of devices */ 1345 /* Add this device to our list of devices */
1339 mutex_lock(&table_lock); 1346 mutex_lock(&table_lock);