Commit 401097ea authored by Shaohua Li's avatar Shaohua Li Committed by Greg Kroah-Hartman

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: default avatarShaohua Li <shaohua.li@intel.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 400ced61
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/semaphore.h> #include <linux/semaphore.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/async.h>
#include "base.h" #include "base.h"
#include "power/power.h" #include "power/power.h"
...@@ -1665,4 +1666,5 @@ void device_shutdown(void) ...@@ -1665,4 +1666,5 @@ void device_shutdown(void)
kobject_put(sysfs_dev_char_kobj); kobject_put(sysfs_dev_char_kobj);
kobject_put(sysfs_dev_block_kobj); kobject_put(sysfs_dev_block_kobj);
kobject_put(dev_kobj); kobject_put(dev_kobj);
async_synchronize_full();
} }
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