Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59381
b: refs/heads/master
c: 4d46109
h: refs/heads/master
i:
  59379: 05a85b0
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jul 12, 2007
1 parent 0fd74ac commit 2195524
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 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: 784a6e1cc406b7ef48476a1f38b83fc551f5616f
refs/heads/master: 4d461095ef6967324bc5da5d65d23ad27fc604f9
9 changes: 8 additions & 1 deletion trunk/drivers/usb/core/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,15 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)
break;
}
}
if (status == 0)
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;
status = usb_suspend_device(udev, msg);
}

/* If the suspend failed, resume interfaces that did get suspended */
if (status != 0) {
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/usb/core/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,6 @@ static void generic_disconnect(struct usb_device *udev)

static int generic_suspend(struct usb_device *udev, pm_message_t msg)
{
/* USB devices enter SUSPEND state through their hubs, but can be
* marked for FREEZE as soon as their children are already idled.
* But those semantics are useless, so we equate the two (sigh).
*/
return usb_port_suspend(udev);
}

Expand Down

0 comments on commit 2195524

Please sign in to comment.