diff options
Diffstat (limited to 'drivers/pci')
| -rw-r--r-- | drivers/pci/pci-driver.c | 6 | ||||
| -rw-r--r-- | drivers/pci/pci.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index f22f69ac6445..1456759936c5 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
| @@ -271,10 +271,12 @@ static int pci_device_suspend(struct device * dev, pm_message_t state) | |||
| 271 | struct pci_driver * drv = pci_dev->driver; | 271 | struct pci_driver * drv = pci_dev->driver; |
| 272 | int i = 0; | 272 | int i = 0; |
| 273 | 273 | ||
| 274 | if (drv && drv->suspend) | 274 | if (drv && drv->suspend) { |
| 275 | i = drv->suspend(pci_dev, state); | 275 | i = drv->suspend(pci_dev, state); |
| 276 | else | 276 | suspend_report_result(drv->suspend, i); |
| 277 | } else { | ||
| 277 | pci_save_state(pci_dev); | 278 | pci_save_state(pci_dev); |
| 279 | } | ||
| 278 | return i; | 280 | return i; |
| 279 | } | 281 | } |
| 280 | 282 | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index bea1ad1ad5ba..042fa5265cf6 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -307,9 +307,11 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
| 307 | * Can enter D0 from any state, but if we can only go deeper | 307 | * Can enter D0 from any state, but if we can only go deeper |
| 308 | * to sleep if we're already in a low power state | 308 | * to sleep if we're already in a low power state |
| 309 | */ | 309 | */ |
| 310 | if (state != PCI_D0 && dev->current_state > state) | 310 | if (state != PCI_D0 && dev->current_state > state) { |
| 311 | printk(KERN_ERR "%s(): %s: state=%d, current state=%d\n", | ||
| 312 | __FUNCTION__, pci_name(dev), state, dev->current_state); | ||
| 311 | return -EINVAL; | 313 | return -EINVAL; |
| 312 | else if (dev->current_state == state) | 314 | } else if (dev->current_state == state) |
| 313 | return 0; /* we're already there */ | 315 | return 0; /* we're already there */ |
| 314 | 316 | ||
| 315 | /* find PCI PM capability in list */ | 317 | /* find PCI PM capability in list */ |
