diff options
Diffstat (limited to 'include/linux/kconfig.h')
-rw-r--r-- | include/linux/kconfig.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 63ca8dacec59..b33c7797eb57 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -36,6 +36,15 @@ #define IS_MODULE(option) config_enabled(option##_MODULE) /* + * IS_REACHABLE(CONFIG_FOO) evaluates to 1 if the currently compiled + * code can call a function defined in code compiled based on CONFIG_FOO. + * This is similar to IS_ENABLED(), but returns false when invoked from + * built-in code when CONFIG_FOO is set to 'm'. + */ +#define IS_REACHABLE(option) (config_enabled(option) || \ + (config_enabled(option##_MODULE) && config_enabled(MODULE))) + +/* * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm', * 0 otherwise. */ |