summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-07-25 01:36:31 -0400
committerLen Brown <len.brown@intel.com>2007-07-25 01:36:31 -0400
commitcb3e0c107bebc6cf3e7158f7aa54c32017c7d4c4 (patch)
tree2c52ac06cce163bf467d259119b824eed96f2eca /drivers/pci/pci.c
parent1e1f3f24cdbc53e67acd7b2e37e6cf0cb11bd13c (diff)
parent50ad147aa09c829cd452fae6ca99396c0b5b0695 (diff)
downloadlinux-cb3e0c107bebc6cf3e7158f7aa54c32017c7d4c4.tar.gz
linux-cb3e0c107bebc6cf3e7158f7aa54c32017c7d4c4.tar.bz2
linux-cb3e0c107bebc6cf3e7158f7aa54c32017c7d4c4.zip
Pull d-states into release branch
Conflicts: drivers/acpi/sleep/main.c 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) {