Skip to content

Commit

Permalink
driver core: synchronize device shutdown
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Shaohua Li authored and gregkh committed Jun 16, 2009
1 parent 400ced6 commit 401097e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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();
}

0 comments on commit 401097e

Please sign in to comment.