PM / Runtime: Asyncronous idle|suspend devices at system resume
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 12 Apr 2013 09:41:06 +0000 (09:41 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 12 Apr 2013 11:34:57 +0000 (13:34 +0200)
Use the asyncronous runtime PM API when returning the runtime
reference for the device after the system resume is completed.

By using the asyncronous runtime PM API we don't have to wait
for each an every device to become idle|suspended. Instead we
can 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
drivers/base/power/generic_ops.c
drivers/base/power/main.c

index 9a6b05a35603c69f4b6b5e38eed5d62f51ea76ff..bba575841f53e3e67bcf0b9729bc59ffa345689a 100644 (file)
@@ -1327,7 +1327,7 @@ static void pm_genpd_complete(struct device *dev)
                pm_generic_complete(dev);
                pm_runtime_set_active(dev);
                pm_runtime_enable(dev);
-               pm_runtime_idle(dev);
+               pm_request_idle(dev);
        }
 }
 
index d03d290f31c25b773da06c111b8cd1440f974c51..bfd898b8988e37ca0dcc985fc28c57fdcde27fa0 100644 (file)
@@ -324,6 +324,6 @@ void pm_generic_complete(struct device *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_runtime_idle(dev);
+       pm_request_idle(dev);
 }
 #endif /* CONFIG_PM_SLEEP */
index 15beb500a4e4c1a837092e75554ea368dbb1ea1f..5a9b6569dd74f8cc97ba15fde613f208bd752c46 100644 (file)
@@ -756,7 +756,7 @@ static void device_complete(struct device *dev, pm_message_t state)
 
        device_unlock(dev);
 
-       pm_runtime_put_sync(dev);
+       pm_runtime_put(dev);
 }
 
 /**