[PATCH v2 03/16] pbl: define IN_PBL & IN_PROPER macros globally

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While we define the macro __PBL__ globally for all PBL files, files that
want to avoid use of #ifdef must explicitly include <pbl.h> to get the
IN_PBL macro definition. Let's add an IN_PROPER macro that's the inverse
of IN_PBL and in preparation for adding IN_PBL to a lot more places,
let's move this definition into <linux/kconfig.h>, which is always
included and thus the macro becomes available globally everywhere.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 include/linux/kconfig.h | 8 ++++++++
 include/pbl.h           | 6 ------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h
index 58f68adbbadf..4e9c77b964a7 100644
--- a/include/linux/kconfig.h
+++ b/include/linux/kconfig.h
@@ -33,4 +33,12 @@
  */
 #define IS_ENABLED(option) __or(IS_BUILTIN(option), IS_MODULE(option))
 
+#ifdef __PBL__
+#define IN_PBL		1
+#define IN_PROPER	0
+#else
+#define IN_PBL		0
+#define IN_PROPER	1
+#endif
+
 #endif /* __LINUX_KCONFIG_H */
diff --git a/include/pbl.h b/include/pbl.h
index 0633e340bef3..abac3458593a 100644
--- a/include/pbl.h
+++ b/include/pbl.h
@@ -6,12 +6,6 @@
 #ifndef __PBL_H__
 #define __PBL_H__
 
-#ifdef __PBL__
-#define IN_PBL	1
-#else
-#define IN_PBL	0
-#endif
-
 #ifndef __ASSEMBLY__
 
 #include <linux/types.h>
-- 
2.39.5





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux