aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
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 c95485398687..fba319d6fcc8 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)
499 return 0; 499 return 0;
500} 500}
501 501
502int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state); 502pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
503 503
504/** 504/**
505 * pci_choose_state - Choose the power state of a PCI device 505 * 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);
513 513
514pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) 514pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)
515{ 515{
516 int ret; 516 pci_power_t ret;
517 517
518 if (!pci_find_capability(dev, PCI_CAP_ID_PM)) 518 if (!pci_find_capability(dev, PCI_CAP_ID_PM))
519 return PCI_D0; 519 return PCI_D0;
520 520
521 if (platform_pci_choose_state) { 521 if (platform_pci_choose_state) {
522 ret = platform_pci_choose_state(dev, state); 522 ret = platform_pci_choose_state(dev, state);
523 if (ret >= 0) 523 if (ret != PCI_POWER_ERROR)
524 state.event = ret; 524 return ret;
525 } 525 }
526 526
527 switch (state.event) { 527 switch (state.event) {