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>
This commit is contained in:
parent
8b3bf5971a
commit
ec0eb323fe
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue