X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fcore%2Fhcd-pci.c;h=5cf6d5f9acbdb749340b0f8922f5ec177afbe3f5;hb=bfaeafcfc2242277e31cc1cfae687afaac0cd9ec;hp=edf4300a3f7a75d748776ab3fe3d69fbf1a6f66d;hpb=5ffd1a6aaacc25be8cd0770a51ec6d46add3a276;p=linux-2.6 diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index edf4300a3f..5cf6d5f9ac 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -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) {