Commit 84167035 authored by Ulf Hansson's avatar Ulf Hansson Committed by Rafael J. Wysocki

PM / Runtime: Improve prepare handling at system suspend for genpd

When genpd prepares for a system suspend it will fetch a runtime
reference for the device. When returning it we now use the
asyncronous runtime PM API. Thus we don't have to wait for the
device to become idle|suspended before we move on and handle the
next device in queue.
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent db28dfac
...@@ -920,7 +920,7 @@ static int pm_genpd_prepare(struct device *dev) ...@@ -920,7 +920,7 @@ static int pm_genpd_prepare(struct device *dev)
pm_wakeup_event(dev, 0); pm_wakeup_event(dev, 0);
if (pm_wakeup_pending()) { if (pm_wakeup_pending()) {
pm_runtime_put_sync(dev); pm_runtime_put(dev);
return -EBUSY; return -EBUSY;
} }
...@@ -961,7 +961,7 @@ static int pm_genpd_prepare(struct device *dev) ...@@ -961,7 +961,7 @@ static int pm_genpd_prepare(struct device *dev)
pm_runtime_enable(dev); pm_runtime_enable(dev);
} }
pm_runtime_put_sync(dev); pm_runtime_put(dev);
return ret; return ret;
} }
......
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