diff options
author | Russ Weight <russell.h.weight@intel.com> | 2022-04-26 22:03:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-29 16:49:44 +0200 |
commit | bc187f6f8d12568413656e2e5b0d51a001e21915 (patch) | |
tree | 4221a16533722959fbe90c1198eeebf7821b7617 /drivers/base/firmware_loader/sysfs.h | |
parent | selftests: firmware: Add firmware upload selftests (diff) | |
download | linux-bc187f6f8d12568413656e2e5b0d51a001e21915.tar.xz linux-bc187f6f8d12568413656e2e5b0d51a001e21915.zip |
firmware_loader: Fix configs for sysfs split
Fix the CONFIGs around register_sysfs_loader(),
unregister_sysfs_loader(), register_firmware_config_sysctl(), and
unregister_firmware_config_sysctl(). The full definitions of the
register_sysfs_loader() and unregister_sysfs_loader() functions should
be used whenever CONFIG_FW_LOADER_SYSFS is defined. The
register_firmware_config_sysctl() and unregister_firmware_config_sysctl()
functions should be stubbed out unless CONFIG_FW_LOADER_USER_HELPER
CONFIG_SYSCTL are both defined.
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Link: https://lore.kernel.org/r/20220426200356.126085-2-russell.h.weight@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/firmware_loader/sysfs.h')
-rw-r--r-- | drivers/base/firmware_loader/sysfs.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/base/firmware_loader/sysfs.h b/drivers/base/firmware_loader/sysfs.h index c21bcfe374ff..e6c487937817 100644 --- a/drivers/base/firmware_loader/sysfs.h +++ b/drivers/base/firmware_loader/sysfs.h @@ -46,10 +46,12 @@ static inline void __fw_fallback_set_timeout(int timeout) { fw_fallback_config.loading_timeout = timeout; } +#endif +#ifdef CONFIG_FW_LOADER_SYSFS int register_sysfs_loader(void); void unregister_sysfs_loader(void); -#ifdef CONFIG_SYSCTL +#if defined(CONFIG_FW_LOADER_USER_HELPER) && defined(CONFIG_SYSCTL) int register_firmware_config_sysctl(void); void unregister_firmware_config_sysctl(void); #else @@ -59,8 +61,8 @@ static inline int register_firmware_config_sysctl(void) } static inline void unregister_firmware_config_sysctl(void) { } -#endif /* CONFIG_SYSCTL */ -#else /* CONFIG_FW_LOADER_USER_HELPER */ +#endif /* CONFIG_FW_LOADER_USER_HELPER && CONFIG_SYSCTL */ +#else /* CONFIG_FW_LOADER_SYSFS */ static inline int register_sysfs_loader(void) { return 0; @@ -69,7 +71,7 @@ static inline int register_sysfs_loader(void) static inline void unregister_sysfs_loader(void) { } -#endif /* CONFIG_FW_LOADER_USER_HELPER */ +#endif /* CONFIG_FW_LOADER_SYSFS */ struct fw_sysfs { bool nowait; |