Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firmware: rename fw_sysfs_fallback to firmware_fallback_sysfs()

This is done since this call is now exposed through kernel-doc,
and since this also paves the way for different future types of
fallback mechanims.

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Luis R. Rodriguez <mcgrof@kernel.org>
[mcgrof: small coding style changes]
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andres Rodriguez and committed by
Greg Kroah-Hartman
cf1cde7c c35f9cbb

+14 -14
+4 -4
drivers/base/firmware_loader/fallback.c
··· 662 662 return fw_force_sysfs_fallback(opt_flags); 663 663 } 664 664 665 - int fw_sysfs_fallback(struct firmware *fw, const char *name, 666 - struct device *device, 667 - enum fw_opt opt_flags, 668 - int ret) 665 + int firmware_fallback_sysfs(struct firmware *fw, const char *name, 666 + struct device *device, 667 + enum fw_opt opt_flags, 668 + int ret) 669 669 { 670 670 if (!fw_run_sysfs_fallback(opt_flags)) 671 671 return ret;
+8 -8
drivers/base/firmware_loader/fallback.h
··· 31 31 }; 32 32 33 33 #ifdef CONFIG_FW_LOADER_USER_HELPER 34 - int fw_sysfs_fallback(struct firmware *fw, const char *name, 35 - struct device *device, 36 - enum fw_opt opt_flags, 37 - int ret); 34 + int firmware_fallback_sysfs(struct firmware *fw, const char *name, 35 + struct device *device, 36 + enum fw_opt opt_flags, 37 + int ret); 38 38 void kill_pending_fw_fallback_reqs(bool only_kill_custom); 39 39 40 40 void fw_fallback_set_cache_timeout(void); ··· 43 43 int register_sysfs_loader(void); 44 44 void unregister_sysfs_loader(void); 45 45 #else /* CONFIG_FW_LOADER_USER_HELPER */ 46 - static inline int fw_sysfs_fallback(struct firmware *fw, const char *name, 47 - struct device *device, 48 - enum fw_opt opt_flags, 49 - int ret) 46 + static inline int firmware_fallback_sysfs(struct firmware *fw, const char *name, 47 + struct device *device, 48 + enum fw_opt opt_flags, 49 + int ret) 50 50 { 51 51 /* Keep carrying over the same error */ 52 52 return ret;
+1 -1
drivers/base/firmware_loader/firmware.h
··· 20 20 * @FW_OPT_NOWAIT: Used to describe the firmware request is asynchronous. 21 21 * @FW_OPT_USERHELPER: Enable the fallback mechanism, in case the direct 22 22 * filesystem lookup fails at finding the firmware. For details refer to 23 - * fw_sysfs_fallback(). 23 + * firmware_fallback_sysfs(). 24 24 * @FW_OPT_NO_WARN: Quiet, avoid printing warning messages. 25 25 * @FW_OPT_NOCACHE: Disables firmware caching. Firmware caching is used to 26 26 * cache the firmware upon suspend, so that upon resume races against the
+1 -1
drivers/base/firmware_loader/main.c
··· 581 581 dev_warn(device, 582 582 "Direct firmware load for %s failed with error %d\n", 583 583 name, ret); 584 - ret = fw_sysfs_fallback(fw, name, device, opt_flags, ret); 584 + ret = firmware_fallback_sysfs(fw, name, device, opt_flags, ret); 585 585 } else 586 586 ret = assign_fw(fw, device, opt_flags); 587 587