aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-04-10 11:00:48 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 15:42:52 -0400
commitfa180eb448fa263cf18dd930143b515d27d70d7b (patch)
treea4aab2612150892bbc55b7fa7eb1559142429730
parent4e4098a3e08783cfd75f9fcdab276dc1d46931da (diff)
PM / Runtime: Idle devices asynchronously after probe|release
Putting devices into idle|suspend in a synchronous manner means we are waiting for each device to become idle|suspended before the probe|release is fully done. This patch switch to use the asynchronous runtime PM API:s instead and thus improves the parallelism since we can move on and handle the next device in queue in an earlier phase. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Kevin Hilman <khilman@linaro.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/base/dd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index bb5645ea0282..35fa36898916 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -380,7 +380,7 @@ int driver_probe_device(struct device_driver *drv, struct device *dev)
380 380
381 pm_runtime_barrier(dev); 381 pm_runtime_barrier(dev);
382 ret = really_probe(dev, drv); 382 ret = really_probe(dev, drv);
383 pm_runtime_idle(dev); 383 pm_request_idle(dev);
384 384
385 return ret; 385 return ret;
386} 386}
@@ -428,7 +428,7 @@ int device_attach(struct device *dev)
428 } 428 }
429 } else { 429 } else {
430 ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach); 430 ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach);
431 pm_runtime_idle(dev); 431 pm_request_idle(dev);
432 } 432 }
433out_unlock: 433out_unlock:
434 device_unlock(dev); 434 device_unlock(dev);
@@ -499,7 +499,7 @@ static void __device_release_driver(struct device *dev)
499 BUS_NOTIFY_UNBIND_DRIVER, 499 BUS_NOTIFY_UNBIND_DRIVER,
500 dev); 500 dev);
501 501
502 pm_runtime_put_sync(dev); 502 pm_runtime_put(dev);
503 503
504 if (dev->bus && dev->bus->remove) 504 if (dev->bus && dev->bus->remove)
505 dev->bus->remove(dev); 505 dev->bus->remove(dev);