summaryrefslogtreecommitdiff
path: root/include/linux/kconfig.h
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2015-04-16 22:48:38 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 16:04:09 +0300
commit02d699f1f464410d5753a034dd38c76a1a1647e0 (patch)
tree28efb83486b5887c2fc1bbe293e2b332ab106678 /include/linux/kconfig.h
parent13f6b191aaa11c7fd718d35a0c565f3c16bc1d99 (diff)
downloadlinux-02d699f1f464410d5753a034dd38c76a1a1647e0.tar.xz
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 @@
#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 */