diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-09-11 12:19:21 +0200 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-09-14 00:45:08 +0800 |
commit | ec0eb323fe934952fcf00bfc08659d0d090e9dd0 (patch) | |
tree | 7f7d1db39e531a362e6b88ddd7edb9ef31ccc321 /include/globalvar.h | |
parent | 8b3bf5971afbdf1acc5becabb6f15ba4b2a5559d (diff) | |
download | barebox-ec0eb323fe934952fcf00bfc08659d0d090e9dd0.tar.gz barebox-ec0eb323fe934952fcf00bfc08659d0d090e9dd0.tar.xz |
globalvar: add inline when not enabled
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/globalvar.h')
-rw-r--r-- | include/globalvar.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/globalvar.h b/include/globalvar.h index 7cc3976f6b..a127a0539e 100644 --- a/include/globalvar.h +++ b/include/globalvar.h @@ -1,6 +1,7 @@ #ifndef __GLOBALVAR_H #define __GLOBALVAR_H +#ifdef CONFIG_GLOBALVAR int globalvar_add_simple(const char *name); int globalvar_add(const char *name, @@ -8,5 +9,24 @@ int globalvar_add(const char *name, const char *(*get)(struct device_d *, struct param_d *p), unsigned long flags); char *globalvar_get_match(const char *match, const char *seperator); +#else +static inline int globalvar_add_simple(const char *name) +{ + return 0; +} + +static inline int globalvar_add(const char *name, + int (*set)(struct device_d *dev, struct param_d *p, const char *val), + const char *(*get)(struct device_d *, struct param_d *p), + unsigned long flags) +{ + return 0; +} + +static inline char *globalvar_get_match(const char *match, const char *seperator) +{ + return NULL; +} +#endif #endif /* __GLOBALVAR_H */ |