PCI/PM: Report wakeup events before resuming devices

Make wakeup events be reported by the PCI subsystem before attempting to
resume devices or queuing up runtime resume requests for them, because
wakeup events should be reported as soon as they have been detected.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
Rafael J. Wysocki
2010-12-29 13:22:08 +01:00
committed by Jesse Barnes
parent b6e335aeeb
commit 0f953bf6b4
3 changed files with 4 additions and 4 deletions

View File

@ -1308,8 +1308,8 @@ bool pci_check_pme_status(struct pci_dev *dev)
static int pci_pme_wakeup(struct pci_dev *dev, void *ign)
{
if (pci_check_pme_status(dev)) {
pm_request_resume(&dev->dev);
pci_wakeup_event(dev);
pm_request_resume(&dev->dev);
}
return 0;
}