aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kconfig.h
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2015-04-16 15:48:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 09:04:09 -0400
commit02d699f1f464410d5753a034dd38c76a1a1647e0 (patch)
tree28efb83486b5887c2fc1bbe293e2b332ab106678 /include/linux/kconfig.h
parent13f6b191aaa11c7fd718d35a0c565f3c16bc1d99 (diff)
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 <michal.simek@xilinx.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kconfig.h')
-rw-r--r--include/linux/kconfig.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h
index be342b94c640..63ca8dacec59 100644
--- a/include/linux/kconfig.h
+++ b/include/linux/kconfig.h
@@ -23,14 +23,6 @@
23#define ___config_enabled(__ignored, val, ...) val 23#define ___config_enabled(__ignored, val, ...) val
24 24
25/* 25/*
26 * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',
27 * 0 otherwise.
28 *
29 */
30#define IS_ENABLED(option) \
31 (config_enabled(option) || config_enabled(option##_MODULE))
32
33/*
34 * IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0 26 * IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0
35 * otherwise. For boolean options, this is equivalent to 27 * otherwise. For boolean options, this is equivalent to
36 * IS_ENABLED(CONFIG_FOO). 28 * IS_ENABLED(CONFIG_FOO).
@@ -43,4 +35,11 @@
43 */ 35 */
44#define IS_MODULE(option) config_enabled(option##_MODULE) 36#define IS_MODULE(option) config_enabled(option##_MODULE)
45 37
38/*
39 * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',
40 * 0 otherwise.
41 */
42#define IS_ENABLED(option) \
43 (IS_BUILTIN(option) || IS_MODULE(option))
44
46#endif /* __LINUX_KCONFIG_H */ 45#endif /* __LINUX_KCONFIG_H */