summaryrefslogtreecommitdiff
path: root/include/linux/firmware.h
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2022-01-12 08:00:53 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-04 16:24:23 +0100
commitbb6e8c28414335a551da5973d44cc537f7abe65a (patch)
tree84fae0e87d25db892f09337698e6892d9b1295af /include/linux/firmware.h
parent8f2d116045431f66de85760e7c83918d741f5533 (diff)
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 <rdunlap@infradead.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Reported-by: Borislav Petkov <bp@alien8.de> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Ackd-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20220112160053.723795-1-mcgrof@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/firmware.h')
-rw-r--r--include/linux/firmware.h2
1 files changed, 1 insertions, 1 deletions
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,