Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104625
b: refs/heads/master
c: 3575858
h: refs/heads/master
i:
  104623: 500a753
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Jul 21, 2008
1 parent 2320864 commit da2179a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95f371f24c48b50e365f4c08d8f61eb8b15b3bba
refs/heads/master: 357585892e56f7c7bec4a9c8dfaf90257c8756c6
7 changes: 7 additions & 0 deletions trunk/drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,7 @@ static void acm_disconnect(struct usb_interface *intf)
tty_hangup(acm->tty);
}

#ifdef CONFIG_PM
static int acm_suspend(struct usb_interface *intf, pm_message_t message)
{
struct acm *acm = usb_get_intfdata(intf);
Expand Down Expand Up @@ -1320,6 +1321,8 @@ static int acm_resume(struct usb_interface *intf)
mutex_unlock(&acm->mutex);
return rv;
}

#endif /* CONFIG_PM */
/*
* USB driver structure.
*/
Expand Down Expand Up @@ -1375,10 +1378,14 @@ static struct usb_driver acm_driver = {
.name = "cdc_acm",
.probe = acm_probe,
.disconnect = acm_disconnect,
#ifdef CONFIG_PM
.suspend = acm_suspend,
.resume = acm_resume,
#endif
.id_table = acm_ids,
#ifdef CONFIG_PM
.supports_autosuspend = 1,
#endif
};

/*
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/usb/class/cdc-wdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,12 +750,16 @@ static int wdm_suspend(struct usb_interface *intf, pm_message_t message)
dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor);

mutex_lock(&desc->plock);
#ifdef CONFIG_PM
if (interface_to_usbdev(desc->intf)->auto_pm && test_bit(WDM_IN_USE, &desc->flags)) {
rv = -EBUSY;
} else {
#endif
cancel_work_sync(&desc->rxwork);
kill_urbs(desc);
#ifdef CONFIG_PM
}
#endif
mutex_unlock(&desc->plock);

return rv;
Expand Down

0 comments on commit da2179a

Please sign in to comment.