diff mbox

backports: restore config_enabled() macro

Message ID 1486466124-31640-1-git-send-email-arend.vanspriel@broadcom.com (mailing list archive)
State Accepted
Headers show

Commit Message

Arend van Spriel Feb. 7, 2017, 11:15 a.m. UTC
Attempted a backport to FC25 4.9.5 kernel and hit issue with IS_BUILTIN()
using config_enabled() macro in backport-include/linux/kconfig.h. Fix this
by using #ifndef.

Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 backport/backport-include/linux/kconfig.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Johannes Berg Feb. 7, 2017, 12:29 p.m. UTC | #1
On Tue, 2017-02-07 at 11:15 +0000, Arend van Spriel wrote:
> Attempted a backport to FC25 4.9.5 kernel and hit issue with
> IS_BUILTIN()
> using config_enabled() macro in backport-include/linux/kconfig.h. Fix
> this
> by using #ifndef.

Hah, very timely - I just had a problem with IS_REACHABLE that this
should solve nicely :)

johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
diff mbox

Patch

diff --git a/backport/backport-include/linux/kconfig.h b/backport/backport-include/linux/kconfig.h
index 4fe2a10..e284dca 100644
--- a/backport/backport-include/linux/kconfig.h
+++ b/backport/backport-include/linux/kconfig.h
@@ -21,6 +21,13 @@ 
         (config_enabled(option) || config_enabled(option##_MODULE))
 #endif
 
+/*
+ * Since 4.9 config_enabled has been removed in favor of __is_defined.
+ */
+#ifndef config_enabled
+#define config_enabled(cfg)	__is_defined(cfg)
+#endif
+
 #undef IS_BUILTIN
 #define IS_BUILTIN(option) config_enabled(option)