summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2008-07-13 22:45:06 +0200
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-07-14 14:25:44 -0700
commitc157dfa3e4aea5775389f2f4d53c040bc8813af1 (patch)
tree3a834cee8623cbdddec1c9d929a85de02b3c45dd /drivers
parentbeef3129b3afb74817acff72fda4a9d951e3973e (diff)
PCI PM: Fix pci_prepare_to_sleep
The recently introduced pci_prepare_to_sleep() needs the following fix, because there are systems which are not power manageable by ACPI (ie. ACPI doesn't provide methods to put the device into low power states and back), but require ACPI hooks to be executed for wake-up to work. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e632a58ba5d0..ace518116cc5 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1152,7 +1152,6 @@ int pci_prepare_to_sleep(struct pci_dev *dev)
break;
default:
target_state = state;
- pci_enable_wake(dev, target_state, true);
}
} else if (device_may_wakeup(&dev->dev)) {
/*
@@ -1167,10 +1166,11 @@ int pci_prepare_to_sleep(struct pci_dev *dev)
while (target_state
&& !(dev->pme_support & (1 << target_state)))
target_state--;
- pci_pme_active(dev, true);
}
}
+ pci_enable_wake(dev, target_state, true);
+
error = pci_set_power_state(dev, target_state);
if (error)