summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-01-07 13:06:10 +0100
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 20:15:31 +0100
commit07e836e8d1f3688311d97fe1bf46980b0f9ae9c1 (patch)
tree24dade02ec3e91868ab9e88d8b255f7725eab0b8 /drivers/pci/pci-driver.c
parentPCI PM: Power-manage devices without drivers during suspend-resume (diff)
downloadlinux-07e836e8d1f3688311d97fe1bf46980b0f9ae9c1.tar.xz
linux-07e836e8d1f3688311d97fe1bf46980b0f9ae9c1.zip
PCI PM: Move pci_has_legacy_pm_support
Move pci_has_legacy_pm_support() closer to the functions that call it. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 2617ebb34e14..bfaa77d88537 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -314,14 +314,6 @@ static void pci_device_shutdown(struct device *dev)
#ifdef CONFIG_PM_SLEEP
-static bool pci_has_legacy_pm_support(struct pci_dev *pci_dev)
-{
- struct pci_driver *drv = pci_dev->driver;
-
- return drv && (drv->suspend || drv->suspend_late || drv->resume
- || drv->resume_early);
-}
-
/*
* Default "suspend" method for devices that have no driver provided suspend,
* or not even a driver at all (first part).
@@ -458,6 +450,14 @@ static void pci_pm_default_suspend(struct pci_dev *pci_dev)
pci_prepare_to_sleep(pci_dev);
}
+static bool pci_has_legacy_pm_support(struct pci_dev *pci_dev)
+{
+ struct pci_driver *drv = pci_dev->driver;
+
+ return drv && (drv->suspend || drv->suspend_late || drv->resume
+ || drv->resume_early);
+}
+
/* New power management framework */
static int pci_pm_prepare(struct device *dev)