From bb6e8c28414335a551da5973d44cc537f7abe65a Mon Sep 17 00:00:00 2001 From: Luis Chamberlain Date: Wed, 12 Jan 2022 08:00:53 -0800 Subject: firmware_loader: simplfy builtin or module check The existing check is outdated and confuses developers. Use the already existing IS_REACHABLE() defined on kconfig.h which makes the intention much clearer. Cc: Randy Dunlap Cc: Masahiro Yamada Reported-by: Borislav Petkov Reported-by: Greg Kroah-Hartman Suggested-by: Masahiro Yamada Signed-off-by: Luis Chamberlain Ackd-by: Randy Dunlap Link: https://lore.kernel.org/r/20220112160053.723795-1-mcgrof@kernel.org Signed-off-by: Greg Kroah-Hartman --- include/linux/firmware.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/firmware.h') diff --git a/include/linux/firmware.h b/include/linux/firmware.h index 3b057dfc8284..ec2ccfebef65 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h @@ -34,7 +34,7 @@ static inline bool firmware_request_builtin(struct firmware *fw, } #endif -#if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE)) +#if IS_REACHABLE(CONFIG_FW_LOADER) int request_firmware(const struct firmware **fw, const char *name, struct device *device); int firmware_request_nowarn(const struct firmware **fw, const char *name, -- cgit v1.2.3