Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59384
b: refs/heads/master
c: f3fd77c
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jul 12, 2007
1 parent 01e43cf commit c016a5f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 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: 8adb4786789c25007f39b4d00dd03cc83bdcb896
refs/heads/master: f3fd77cd2f4499f3e2ef9a1e6d5e4f4349d556c3
3 changes: 2 additions & 1 deletion trunk/drivers/usb/core/hcd-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
* We must ignore the FREEZE vs SUSPEND distinction here, because
* otherwise the swsusp will save (and restore) garbage state.
*/
if (hcd->self.root_hub->dev.power.power_state.event == PM_EVENT_ON)
if (!(hcd->state == HC_STATE_SUSPENDED ||
hcd->state == HC_STATE_HALT))
return -EBUSY;

if (hcd->driver->suspend) {
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/usb/storage/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ static int storage_suspend(struct usb_interface *iface, pm_message_t message)
US_DEBUGP("%s\n", __FUNCTION__);
if (us->suspend_resume_hook)
(us->suspend_resume_hook)(us, US_SUSPEND);
iface->dev.power.power_state.event = message.event;

/* When runtime PM is working, we'll set a flag to indicate
* whether we should autoresume when a SCSI request arrives. */
Expand All @@ -215,7 +214,6 @@ static int storage_resume(struct usb_interface *iface)
US_DEBUGP("%s\n", __FUNCTION__);
if (us->suspend_resume_hook)
(us->suspend_resume_hook)(us, US_RESUME);
iface->dev.power.power_state.event = PM_EVENT_ON;

mutex_unlock(&us->dev_mutex);
return 0;
Expand Down

0 comments on commit c016a5f

Please sign in to comment.