Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67892
b: refs/heads/master
c: 5ad4f71
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent 58865aa commit fbed3dc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 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: 7477120e34eef65a530cfb3fea5fe612c89669e5
refs/heads/master: 5ad4f71e2f19a06f738463da1f09ea7fda3a3db2
9 changes: 1 addition & 8 deletions trunk/drivers/usb/core/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,15 +1088,8 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)
break;
}
}
if (status == 0) {

/* Non-root devices don't need to do anything for FREEZE
* or PRETHAW. */
if (udev->parent && (msg.event == PM_EVENT_FREEZE ||
msg.event == PM_EVENT_PRETHAW))
goto done;
if (status == 0)
status = usb_suspend_device(udev, msg);
}

/* If the suspend failed, resume interfaces that did get suspended */
if (status != 0) {
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/usb/core/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,13 @@ static int generic_suspend(struct usb_device *udev, pm_message_t msg)
*/
if (!udev->parent)
rc = hcd_bus_suspend(udev);

/* Non-root devices don't need to do anything for FREEZE or PRETHAW */
else if (msg.event == PM_EVENT_FREEZE || msg.event == PM_EVENT_PRETHAW)
rc = 0;
else
rc = usb_port_suspend(udev);

return rc;
}

Expand Down

0 comments on commit fbed3dc

Please sign in to comment.