From akpm@linux-foundation.org Tue Jun 2 11:59:34 2009 Date: Tue, 12 May 2009 13:37:57 -0700 From: Shaohua Li Subject: driver core: synchronize device shutdown To: greg@kroah.com Cc: akpm@linux-foundation.org, shaohua.li@intel.com, James.Bottomley@HansenPartnership.com, arjan@infradead.org, dtor@mail.ru Message-ID: <200905122057.n4CKvDPk003386@imap1.linux-foundation.org> From: Shaohua Li 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 Cc: Arjan van de Ven Cc: Dmitry Torokhov Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/base/core.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -22,6 +22,7 @@ #include #include #include +#include #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(); }