diff options
Diffstat (limited to 'include/linux/kconfig.h')
-rw-r--r-- | include/linux/kconfig.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 9d12c970f18f..24a59cb06963 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -2,8 +2,6 @@ #ifndef __LINUX_KCONFIG_H #define __LINUX_KCONFIG_H -/* CONFIG_CC_VERSION_TEXT (Do not delete this comment. See help in Kconfig) */ - #include <generated/autoconf.h> #ifdef CONFIG_CPU_BIG_ENDIAN @@ -72,4 +70,10 @@ */ #define IS_ENABLED(option) __or(IS_BUILTIN(option), IS_MODULE(option)) +/* + * IF_ENABLED(CONFIG_FOO, ptr) evaluates to (ptr) if CONFIG_FOO is set to 'y' + * or 'm', NULL otherwise. + */ +#define IF_ENABLED(option, ptr) (IS_ENABLED(option) ? (ptr) : NULL) + #endif /* __LINUX_KCONFIG_H */ |