summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-01-22 23:36:56 +0100
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-27 18:46:27 +0100
commit545ffd58adc86b8d33449dab44fe81b503a6f81b (patch)
treea5fc5a72325e27ddb341e49f5f0d00b20d05c0c5 /drivers
parentPCI: irq and pci_ids patch for Intel Tigerpoint DeviceIDs (diff)
downloadlinux-545ffd58adc86b8d33449dab44fe81b503a6f81b.tar.xz
linux-545ffd58adc86b8d33449dab44fe81b503a6f81b.zip
PCI PM: Fix hibernation breakage on EeePC 701
Hibernation breaks on EeePC 701 as a result of attempting to put one of its (driverless) devices into a low power state. Avoid that by not attepmting to power manage driverless devices during hibernation. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reported-and-tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pci-driver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 4884c4840b3d..ab1d615425a8 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -669,7 +669,10 @@ static int pci_pm_poweroff(struct device *dev)
if (pci_has_legacy_pm_support(pci_dev))
return pci_legacy_suspend(dev, PMSG_HIBERNATE);
- if (drv && drv->pm && drv->pm->poweroff) {
+ if (!drv || !drv->pm)
+ return 0;
+
+ if (drv->pm->poweroff) {
error = drv->pm->poweroff(dev);
suspend_report_result(drv->pm->poweroff, error);
}