Commit 07e836e8 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Jesse Barnes

PCI PM: Move pci_has_legacy_pm_support

Move pci_has_legacy_pm_support() closer to the functions that
call it.
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 571ff758
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment