summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/pci_pci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 5fa886e..6457e81 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -933,11 +933,13 @@ int
pcib_resume(device_t dev)
{
device_t pcib;
+ int dstate;
if (pci_do_power_resume) {
pcib = device_get_parent(device_get_parent(dev));
- if (PCIB_POWER_FOR_SLEEP(pcib, dev, NULL) == 0)
- pci_set_powerstate(dev, PCI_POWERSTATE_D0);
+ dstate = PCI_POWERSTATE_D0;
+ if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0)
+ pci_set_powerstate(dev, dstate);
}
pcib_cfg_restore(device_get_softc(dev));
return (bus_generic_resume(dev));
OpenPOWER on IntegriCloud