public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <tom.leiming@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] driver core : fix request_firmware_nowait
Date: Fri, 29 May 2009 11:33:19 +0800	[thread overview]
Message-ID: <20090529113319.274d7d4f@linux-lm> (raw)
In-Reply-To: <20090529014341.GA12295@kroah.com>

On Thu, 28 May 2009 18:43:41 -0700
Greg KH <greg@kroah.com> wrote:
> 
> Anyway, I suggest just fixing the documentation, it's easier :)

Ok, it is the patch which fixes the documentation.
Thanks.

>From 32a1fe6013ed796d397417cc60d5e9a2aa66d74a Mon Sep 17 00:00:00 2001
From: Ming Lei <tom.leiming@gmail.com>
Date: Fri, 29 May 2009 11:23:04 +0800
Subject: [PATCH] driver core: fix documentation of request_firmware_nowait

request_firmware_nowait declares it can be called in non-sleep contexts,
but kthead_run called by request_firmware_nowait may sleep. So fix its
documentation and comment to make callers clear about it.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 Documentation/firmware_class/README |    3 ++-
 drivers/base/firmware_class.c       |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README
index c3480aa..3a37ad3 100644
--- a/Documentation/firmware_class/README
+++ b/Documentation/firmware_class/README
@@ -77,7 +77,8 @@
    seconds for the whole load operation.
 
  - request_firmware_nowait() is also provided for convenience in
-   non-user contexts.
+   user contexts to request firmware asynchronously, but can't be called
+   in atomic contexts.
 
 
  about in-kernel persistence:
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 2d296b7..2427702 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -617,8 +617,9 @@ request_firmware_work_func(void *arg)
  * @cont: function will be called asynchronously when the firmware
  *	request is over.
  *
- *	Asynchronous variant of request_firmware() for contexts where
- *	it is not possible to sleep.
+ *	Asynchronous variant of request_firmware() for user contexts where
+ *	it is not possible to sleep for long time. It can't be called
+ *	in atomic contexts.
  **/
 int
 request_firmware_nowait(
-- 
1.6.0.GIT




-- 
Lei Ming

      reply	other threads:[~2009-05-29  3:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 15:06 [PATCH] driver core : fix request_firmware_nowait tom.leiming
2009-05-22 15:10 ` Alan Cox
2009-05-22 15:26   ` Ming Lei
2009-05-28 20:14     ` Greg KH
2009-05-29  1:24       ` Ming Lei
2009-05-29  1:43         ` Greg KH
2009-05-29  3:33           ` Ming Lei [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090529113319.274d7d4f@linux-lm \
    --to=tom.leiming@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox