Merge branches 'acpi-pm' and 'pm-genirq'

* acpi-pm:
  ACPI: invoke acpi_device_wakeup() with correct parameters

* pm-genirq:
  PCI / PM: handle failure to enable wakeup on PCIe PME
This commit is contained in:
Rafael J. Wysocki 2014-10-23 23:02:58 +02:00
commit 49fe035368
2 changed files with 5 additions and 3 deletions

View File

@ -710,7 +710,7 @@ int acpi_pm_device_run_wake(struct device *phys_dev, bool enable)
return -ENODEV; return -ENODEV;
} }
return acpi_device_wakeup(adev, enable, ACPI_STATE_S0); return acpi_device_wakeup(adev, ACPI_STATE_S0, enable);
} }
EXPORT_SYMBOL(acpi_pm_device_run_wake); EXPORT_SYMBOL(acpi_pm_device_run_wake);
#endif /* CONFIG_PM_RUNTIME */ #endif /* CONFIG_PM_RUNTIME */

View File

@ -397,6 +397,7 @@ static int pcie_pme_suspend(struct pcie_device *srv)
struct pcie_pme_service_data *data = get_service_data(srv); struct pcie_pme_service_data *data = get_service_data(srv);
struct pci_dev *port = srv->port; struct pci_dev *port = srv->port;
bool wakeup; bool wakeup;
int ret;
if (device_may_wakeup(&port->dev)) { if (device_may_wakeup(&port->dev)) {
wakeup = true; wakeup = true;
@ -407,9 +408,10 @@ static int pcie_pme_suspend(struct pcie_device *srv)
} }
spin_lock_irq(&data->lock); spin_lock_irq(&data->lock);
if (wakeup) { if (wakeup) {
enable_irq_wake(srv->irq); ret = enable_irq_wake(srv->irq);
data->suspend_level = PME_SUSPEND_WAKEUP; data->suspend_level = PME_SUSPEND_WAKEUP;
} else { }
if (!wakeup || ret) {
struct pci_dev *port = srv->port; struct pci_dev *port = srv->port;
pcie_pme_interrupt_enable(port, false); pcie_pme_interrupt_enable(port, false);