]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
firmware loader: document firmware cache mechanism
authorMing Lei <tom.leiming@gmail.com>
Sat, 3 Nov 2012 09:48:16 +0000 (17:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Nov 2012 23:07:18 +0000 (15:07 -0800)
This patch documents the firmware cache mechanism so that
users of request_firmware() know that it can be called
safely inside device's suspend and resume callback, and
the device's firmware needn't be cached any more by individual
driver itself to deal with firmware loss during system resume.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/firmware_class/README
drivers/base/firmware_class.c

index e9fce78c4137daf3a01f031ff438dd8b74477db6..43fada989e65f2b27111c1b3fb7190ef81092014 100644 (file)
    on the setup, so I think that the choice on what firmware to make
    persistent should be left to userspace.
 
+ about firmware cache:
+ --------------------
+ After firmware cache mechanism is introduced during system sleep,
+ request_firmware can be called safely inside device's suspend and
+ resume callback, and callers need't cache the firmware by
+ themselves any more for dealing with firmware loss during system
+ resume.
index 7888af7941a0fefd34460e10c8d544106b6cbb6f..d81460309182fde4177865a922f740c278c7d40c 100644 (file)
@@ -988,6 +988,9 @@ err_put_dev:
  *      firmware image for this or any other device.
  *
  *     Caller must hold the reference count of @device.
+ *
+ *     The function can be called safely inside device's suspend and
+ *     resume callback.
  **/
 int
 request_firmware(const struct firmware **firmware_p, const char *name,