diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-14 18:13:50 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-14 18:13:50 -0500 |
commit | dea553e3fc63c5e53a3f8741f0c9f840660cf06e (patch) | |
tree | 3f87bc48f50c318f248934e74de8206a8597480f /drivers/pci | |
parent | 77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff) | |
parent | 7e4d68443a80574392d1027ff34992ab945934a6 (diff) |
Merge branch 'pm-qos' into acpi-dev-pm
Material in the 'acpi-dev-pm' branch depends on 'pm-qos' commits.
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-acpi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index c5792d622dc4..63d6618a4804 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/pci-acpi.h> | 18 | #include <linux/pci-acpi.h> |
19 | #include <linux/pm_runtime.h> | 19 | #include <linux/pm_runtime.h> |
20 | #include <linux/pm_qos.h> | ||
20 | #include "pci.h" | 21 | #include "pci.h" |
21 | 22 | ||
22 | static DEFINE_MUTEX(pci_acpi_pm_notify_mtx); | 23 | static DEFINE_MUTEX(pci_acpi_pm_notify_mtx); |
@@ -257,11 +258,16 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
257 | return -ENODEV; | 258 | return -ENODEV; |
258 | 259 | ||
259 | switch (state) { | 260 | switch (state) { |
261 | case PCI_D3cold: | ||
262 | if (dev_pm_qos_flags(&dev->dev, PM_QOS_FLAG_NO_POWER_OFF) == | ||
263 | PM_QOS_FLAGS_ALL) { | ||
264 | error = -EBUSY; | ||
265 | break; | ||
266 | } | ||
260 | case PCI_D0: | 267 | case PCI_D0: |
261 | case PCI_D1: | 268 | case PCI_D1: |
262 | case PCI_D2: | 269 | case PCI_D2: |
263 | case PCI_D3hot: | 270 | case PCI_D3hot: |
264 | case PCI_D3cold: | ||
265 | error = acpi_bus_set_power(handle, state_conv[state]); | 271 | error = acpi_bus_set_power(handle, state_conv[state]); |
266 | } | 272 | } |
267 | 273 | ||