From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregkh@linuxfoundation.org (Greg KH) Date: Thu, 8 May 2014 21:03:07 +0200 Subject: [PATCH 1/2] driver-core: allow asynchronous device shutdown In-Reply-To: <1399572454-30239-2-git-send-email-keith.busch@intel.com> References: <1399572454-30239-1-git-send-email-keith.busch@intel.com> <1399572454-30239-2-git-send-email-keith.busch@intel.com> Message-ID: <20140508190307.GA6766@kroah.com> On Thu, May 08, 2014@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 > --- > 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 > #include > #include > #include > @@ -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