]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
PM / Runtime: Improve prepare handling at system suspend for genpd
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 12 Apr 2013 09:41:44 +0000 (09:41 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 12 Apr 2013 11:34:57 +0000 (13:34 +0200)
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: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c

index bba575841f53e3e67bcf0b9729bc59ffa345689a..7072404c8b6da6ddb7ba6633cab5da087e49868e 100644 (file)
@@ -920,7 +920,7 @@ static int pm_genpd_prepare(struct device *dev)
                pm_wakeup_event(dev, 0);
 
        if (pm_wakeup_pending()) {
-               pm_runtime_put_sync(dev);
+               pm_runtime_put(dev);
                return -EBUSY;
        }
 
@@ -961,7 +961,7 @@ static int pm_genpd_prepare(struct device *dev)
                pm_runtime_enable(dev);
        }
 
-       pm_runtime_put_sync(dev);
+       pm_runtime_put(dev);
        return ret;
 }