aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2012-10-19 19:06:24 -0400
committerMichal Marek <mmarek@suse.cz>2012-11-20 05:20:08 -0500
commitb341f7882f04cc70b7437583f012a8d93fbfb00e (patch)
tree6d6a829a9cce0e9c3f03547dfbd699629ff490aa /scripts/kconfig
parent337a275d03e0b900dc8ac3ab5583d18099fedae6 (diff)
kconfig: add a function to get the CONFIG_ prefix
Currently, we get the CONFIG_ prefix via the CONFIG_ macro, which means the CONFIG_ prefix is hard-coded at compile time. This goes against having a run-time defined CONFIG_ prefix. Add a function that returns the CONFIG_ prefix to use (but keep the current hard-coded behavior, to be changed in a later patch). To avoid touching all the code that uses the CONFIG_ macro, we just undef it, and define it to be a call to the function. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/lkc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index c18f2bd9c095..7aa9db0b2a77 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -39,6 +39,12 @@ extern "C" {
39#ifndef CONFIG_ 39#ifndef CONFIG_
40#define CONFIG_ "CONFIG_" 40#define CONFIG_ "CONFIG_"
41#endif 41#endif
42static inline const char *CONFIG_prefix(void)
43{
44 return CONFIG_;
45}
46#undef CONFIG_
47#define CONFIG_ CONFIG_prefix()
42 48
43#define TF_COMMAND 0x0001 49#define TF_COMMAND 0x0001
44#define TF_PARAM 0x0002 50#define TF_PARAM 0x0002