summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/firmware_class/README7
-rw-r--r--drivers/base/firmware_class.c3
2 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README
index e9fce78c413..43fada989e6 100644
--- a/Documentation/firmware_class/README
+++ b/Documentation/firmware_class/README
@@ -119,3 +119,10 @@
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.
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 7888af7941a..d8146030918 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -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,