summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2007-07-20 04:03:22 +0200
committerLen Brown <len.brown@intel.com>2007-07-22 10:18:32 +0200
commitab826ca4cf2fe8ebcfd21189ca8bfeb47ca88359 (patch)
treefe98e808f9b593580979308a48d52184e59d734c /drivers/pci/pci.c
parentACPI, PNP: hook ACPI D-state to PNP suspend/resume (diff)
downloadlinux-ab826ca4cf2fe8ebcfd21189ca8bfeb47ca88359.tar.xz
linux-ab826ca4cf2fe8ebcfd21189ca8bfeb47ca88359.zip
ACPI: Use ACPI methods to select PCI device suspend state
applied after Rafel's 'PM: Update global suspend and hibernation operations framework' patch set Signed-off-by: Shaohua Li<shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 03fd59e80fef..1458fd69e670 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -499,7 +499,7 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
return 0;
}
-int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
+pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
/**
* pci_choose_state - Choose the power state of a PCI device
@@ -513,15 +513,15 @@ int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)
{
- int ret;
+ pci_power_t ret;
if (!pci_find_capability(dev, PCI_CAP_ID_PM))
return PCI_D0;
if (platform_pci_choose_state) {
ret = platform_pci_choose_state(dev, state);
- if (ret >= 0)
- state.event = ret;
+ if (ret != PCI_POWER_ERROR)
+ return ret;
}
switch (state.event) {