aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Chamberlain <[email protected]>2022-01-12 08:00:53 -0800
committerGreg Kroah-Hartman <[email protected]>2022-02-04 16:24:23 +0100
commitbb6e8c28414335a551da5973d44cc537f7abe65a (patch)
tree84fae0e87d25db892f09337698e6892d9b1295af
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 <[email protected]> Cc: Masahiro Yamada <[email protected]> Reported-by: Borislav Petkov <[email protected]> Reported-by: Greg Kroah-Hartman <[email protected]> Suggested-by: Masahiro Yamada <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]> Ackd-by: Randy Dunlap <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-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,