diff options
author | Shaohua Li <[email protected]> | 2009-05-12 13:37:57 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2009-06-15 21:30:24 -0700 |
commit | 401097ea4b89846d66ac78f7f108d49c2e922d9c (patch) | |
tree | b16007ce17630731002757c02b25052e7ec7529c | |
parent | 400ced61fa4914457d7e0a38e7c0fc6fd208694b (diff) |
driver core: synchronize device shutdown
A patch series to make .shutdown execute asynchronously. Some drivers's
shutdown can take a lot of time. The patches can help save some shutdown
time. The patches use Arjan's async API.
This patch:
synchronize all tasks submitted by .shutdown
Signed-off-by: Shaohua Li <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: James Bottomley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/base/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 1977d4beb89e..7e8576d7822d 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -22,6 +22,7 @@ #include <linux/kallsyms.h> #include <linux/semaphore.h> #include <linux/mutex.h> +#include <linux/async.h> #include "base.h" #include "power/power.h" @@ -1665,4 +1666,5 @@ void device_shutdown(void) kobject_put(sysfs_dev_char_kobj); kobject_put(sysfs_dev_block_kobj); kobject_put(dev_kobj); + async_synchronize_full(); } |