diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README index e9fce78c4137daf3a01f031ff438dd8b74477db6..43fada989e65f2b27111c1b3fb7190ef81092014 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 7888af7941a0fefd34460e10c8d544106b6cbb6f..d81460309182fde4177865a922f740c278c7d40c 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -988,6 +988,9 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent, * 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,