From: Michal Simek Date: Thu, 16 Apr 2015 19:48:38 +0000 (-0700) Subject: include/linux/kconfig.h: ese macros which are already defined X-Git-Tag: v4.9.8~4433^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02d699f1f464410d5753a034dd38c76a1a1647e0;p=platform%2Fkernel%2Flinux-rpi3.git include/linux/kconfig.h: ese macros which are already defined It is better to use macros which are already available because then there is just one location which needs to be change. [akpm@linux-foundation.org: move IS_ENABLED definition to after the IS_BUILTIN and IS_MODULE definitions] Signed-off-by: Michal Simek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index be342b9..63ca8da 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -23,14 +23,6 @@ #define ___config_enabled(__ignored, val, ...) val /* - * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm', - * 0 otherwise. - * - */ -#define IS_ENABLED(option) \ - (config_enabled(option) || config_enabled(option##_MODULE)) - -/* * IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0 * otherwise. For boolean options, this is equivalent to * IS_ENABLED(CONFIG_FOO). @@ -43,4 +35,11 @@ */ #define IS_MODULE(option) config_enabled(option##_MODULE) +/* + * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm', + * 0 otherwise. + */ +#define IS_ENABLED(option) \ + (IS_BUILTIN(option) || IS_MODULE(option)) + #endif /* __LINUX_KCONFIG_H */