Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303850
b: refs/heads/master
c: 5cbe61c
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed May 7, 2012
1 parent 85692e6 commit 4909f39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23063b378de734383c9f42de770b01cd661cd9b4
refs/heads/master: 5cbe61c5aff0a8ada691eb8b07dbfb55c303f640
9 changes: 7 additions & 2 deletions trunk/drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,6 @@ static int usb_serial_register(struct usb_serial_driver *driver)
driver->description);
return -EINVAL;
}
driver->usb_driver->supports_autosuspend = 1;

/* Add this device to our list of devices */
mutex_lock(&table_lock);
Expand Down Expand Up @@ -1371,7 +1370,7 @@ static void usb_serial_deregister(struct usb_serial_driver *device)
* @serial_drivers: NULL-terminated array of pointers to drivers to be registered
*
* Registers @udriver and all the drivers in the @serial_drivers array.
* Automatically fills in the .no_dynamic_id field in @udriver and
* Automatically fills in the .no_dynamic_id and PM fields in @udriver and
* the .usb_driver field in each serial driver.
*/
int usb_serial_register_drivers(struct usb_driver *udriver,
Expand All @@ -1390,11 +1389,17 @@ int usb_serial_register_drivers(struct usb_driver *udriver,
* the serial drivers are registered, because the probe would
* simply fail for lack of a matching serial driver.
* Therefore save off udriver's id_table until we are all set.
*
* Suspend/resume support is implemented in the usb-serial core,
* so fill in the PM-related fields in udriver.
*/
saved_id_table = udriver->id_table;
udriver->id_table = NULL;

udriver->no_dynamic_id = 1;
udriver->supports_autosuspend = 1;
udriver->suspend = usb_serial_suspend;
udriver->resume = usb_serial_resume;
rc = usb_register(udriver);
if (rc)
return rc;
Expand Down

0 comments on commit 4909f39

Please sign in to comment.