Commit c2df86ea authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent a5e22db2
...@@ -296,11 +296,5 @@ void pm_generic_complete(struct device *dev) ...@@ -296,11 +296,5 @@ void pm_generic_complete(struct device *dev)
if (drv && drv->pm && drv->pm->complete) if (drv && drv->pm && drv->pm->complete)
drv->pm->complete(dev); drv->pm->complete(dev);
/*
* Let runtime PM try to suspend devices that haven't been in use before
* going into the system-wide sleep state we're resuming from.
*/
pm_request_idle(dev);
} }
#endif /* CONFIG_PM_SLEEP */ #endif /* CONFIG_PM_SLEEP */
...@@ -686,13 +686,8 @@ static int pci_pm_prepare(struct device *dev) ...@@ -686,13 +686,8 @@ static int pci_pm_prepare(struct device *dev)
static void pci_pm_complete(struct device *dev) static void pci_pm_complete(struct device *dev)
{ {
struct device_driver *drv = dev->driver; pci_dev_complete_resume(to_pci_dev(dev));
struct pci_dev *pci_dev = to_pci_dev(dev); pm_generic_complete(dev);
pci_dev_complete_resume(pci_dev);
if (drv && drv->pm && drv->pm->complete)
drv->pm->complete(dev);
} }
#else /* !CONFIG_PM_SLEEP */ #else /* !CONFIG_PM_SLEEP */
......
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