summaryrefslogtreecommitdiff
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-30 03:44:29 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-14 03:17:06 +0300
commitc2df86ea924a8548f54ce90e46fdd6c9495119b2 (patch)
treef2e82708b771820f450bf23e2055acc6fcc4318e /drivers/pci/pci-driver.c
parenta5e22db2689dc717cc3aaeb0c92c3f5445c5ea1f (diff)
downloadlinux-c2df86ea924a8548f54ce90e46fdd6c9495119b2.tar.xz
PM / sleep: Drop pm_request_idle() from pm_generic_complete()
The pm_request_idle() in pm_generic_complete() is pointless as it is called with the runtime PM usage counter different from zero (bumped up by the core during the prepare phase of system suspend) and the core calls pm_runtime_put() for all devices after executing their complete callbacks, so drop it. This allows the PCI PM layer to use pm_generic_complete() too. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 8dfb144b8ccf..c9ce3073d7fe 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -686,13 +686,8 @@ static int pci_pm_prepare(struct device *dev)
static void pci_pm_complete(struct device *dev)
{
- struct device_driver *drv = dev->driver;
- struct pci_dev *pci_dev = to_pci_dev(dev);
-
- pci_dev_complete_resume(pci_dev);
-
- if (drv && drv->pm && drv->pm->complete)
- drv->pm->complete(dev);
+ pci_dev_complete_resume(to_pci_dev(dev));
+ pm_generic_complete(dev);
}
#else /* !CONFIG_PM_SLEEP */