Skip to content

Commit 60fa742

Browse files
mcgrofgregkh
authored andcommitted
rename: _request_firmware_load() fw_load_sysfs_fallback()
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>
1 parent b3cf21f commit 60fa742

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎Documentation/driver-api/firmware/fallback-mechanisms.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Since a device is created for the sysfs interface to help load firmware as a
112112
fallback mechanism userspace can be informed of the addition of the device by
113113
relying on kobject uevents. The addition of the device into the device
114114
hierarchy means the fallback mechanism for firmware loading has been initiated.
115-
For details of implementation refer to _request_firmware_load(), in particular
115+
For details of implementation refer to fw_load_sysfs_fallback(), in particular
116116
on the use of dev_set_uevent_suppress() and kobject_uevent().
117117

118118
The kernel's kobject uevent mechanism is implemented in lib/kobject_uevent.c,

‎drivers/base/firmware_loader/fallback.c‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,15 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
535535
return fw_sysfs;
536536
}
537537

538-
/* load a firmware via user helper */
539-
static int _request_firmware_load(struct fw_sysfs *fw_sysfs,
538+
/**
539+
* fw_load_sysfs_fallback - load a firmware via the syfs fallback mechanism
540+
* @fw_sysfs: firmware syfs information for the firmware to load
541+
* @opt_flags: flags of options, FW_OPT_*
542+
* @timeout: timeout to wait for the load
543+
*
544+
* In charge of constructing a sysfs fallback interface for firmware loading.
545+
**/
546+
static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs,
540547
unsigned int opt_flags, long timeout)
541548
{
542549
int retval = 0;
@@ -621,7 +628,7 @@ static int fw_load_from_user_helper(struct firmware *firmware,
621628
}
622629

623630
fw_sysfs->fw_priv = firmware->priv;
624-
ret = _request_firmware_load(fw_sysfs, opt_flags, timeout);
631+
ret = fw_load_sysfs_fallback(fw_sysfs, opt_flags, timeout);
625632

626633
if (!ret)
627634
ret = assign_fw(firmware, device, opt_flags);

0 commit comments

Comments
 (0)