Re: [PATCH 1/2] driver-core: allow asynchronous device shutdown

From: Greg KH
Date: Thu May 08 2014 - 15:03:22 EST


On Thu, May 08, 2014 at 12:07:33PM -0600, Keith Busch wrote:
> A patch to allow .shutdown to execute asynchronously. Some devices may
> take a long time to complete a shutdown, so this patch lets a driver
> safely shutdown multiple devices asynchronously.
>
> This uses an exclusive asynchronous domain so other unrelated async
> tasks can't cause shutdown to hold up indefinitely.
>
> Signed-off-by: Keith Busch <keith.busch@xxxxxxxxx>
> ---
> drivers/base/core.c | 4 ++++
> include/linux/device.h | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 20da3ad..71b83bb 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -10,6 +10,7 @@
> *
> */
>
> +#include <linux/async.h>
> #include <linux/device.h>
> #include <linux/err.h>
> #include <linux/init.h>
> @@ -1926,6 +1927,8 @@ out:
> }
> EXPORT_SYMBOL_GPL(device_move);
>
> +ASYNC_DOMAIN_EXCLUSIVE(shutdown_domain);
> +EXPORT_SYMBOL(shutdown_domain);

EXPORT_SYMBOL_GPL() please, for driver core functions.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/