]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rename: _request_firmware_load() fw_load_sysfs_fallback()
authorLuis R. Rodriguez <mcgrof@kernel.org>
Sat, 10 Mar 2018 14:14:55 +0000 (06:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Mar 2018 08:28:47 +0000 (09:28 +0100)
This reflects much clearer what is being done.
While at it, kdoc'ify it.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/driver-api/firmware/fallback-mechanisms.rst
drivers/base/firmware_loader/fallback.c

index 4055ac76b288cf9ff72b70dd34a472257a03df63..f353783ae0be5d2823c285538eeb7a898b4f0408 100644 (file)
@@ -112,7 +112,7 @@ Since a device is created for the sysfs interface to help load firmware as a
 fallback mechanism userspace can be informed of the addition of the device by
 relying on kobject uevents. The addition of the device into the device
 hierarchy means the fallback mechanism for firmware loading has been initiated.
-For details of implementation refer to _request_firmware_load(), in particular
+For details of implementation refer to fw_load_sysfs_fallback(), in particular
 on the use of dev_set_uevent_suppress() and kobject_uevent().
 
 The kernel's kobject uevent mechanism is implemented in lib/kobject_uevent.c,
index d6838e7ec00c8dcb334d5e2bd362bbf5899178d2..0a8ec7fec5857f6a851dd58d6348074ace25a6ba 100644 (file)
@@ -535,8 +535,15 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
        return fw_sysfs;
 }
 
-/* load a firmware via user helper */
-static int _request_firmware_load(struct fw_sysfs *fw_sysfs,
+/**
+ * fw_load_sysfs_fallback - load a firmware via the syfs fallback mechanism
+ * @fw_sysfs: firmware syfs information for the firmware to load
+ * @opt_flags: flags of options, FW_OPT_*
+ * @timeout: timeout to wait for the load
+ *
+ * In charge of constructing a sysfs fallback interface for firmware loading.
+ **/
+static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs,
                                  unsigned int opt_flags, long timeout)
 {
        int retval = 0;
@@ -621,7 +628,7 @@ static int fw_load_from_user_helper(struct firmware *firmware,
        }
 
        fw_sysfs->fw_priv = firmware->priv;
-       ret = _request_firmware_load(fw_sysfs, opt_flags, timeout);
+       ret = fw_load_sysfs_fallback(fw_sysfs, opt_flags, timeout);
 
        if (!ret)
                ret = assign_fw(firmware, device, opt_flags);