summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristian Eggers <ceggers@arri.de>2020-01-21 11:45:27 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-01-22 09:02:52 +0100
commit4c9ab9a7e82de74c9371ab46abe649072d08bbf5 (patch)
tree8551b00cd9885bbd1e40d8ee25b01893a4f8943e /include
parentf7e0cae434bba1cd1044418c75dcc58141d82fe0 (diff)
downloadbarebox-4c9ab9a7e82de74c9371ab46abe649072d08bbf5.tar.gz
barebox-4c9ab9a7e82de74c9371ab46abe649072d08bbf5.tar.xz
param: Make enum param_tristate always visible
When disabling CONFIG_SHELL_HUSH, also CONFIG_PARAMETER may be disabled. In this case, the definition "enum param_tristate" is not reachable from watchdog.h. I also considered moving almost everything in watchdog.h inside the CONFIG_WATCHDOG guard. But this doesn't work for me because drivers/watchdog/imxwd.c can also be built without CONFIG_WATCHDOG. Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/param.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/param.h b/include/param.h
index d75f50ea3e..f1166eb289 100644
--- a/include/param.h
+++ b/include/param.h
@@ -37,6 +37,8 @@ struct param_d {
enum param_type type;
};
+enum param_tristate { PARAM_TRISTATE_UNKNOWN, PARAM_TRISTATE_TRUE, PARAM_TRISTATE_FALSE };
+
#ifdef CONFIG_PARAMETER
const char *get_param_type(struct param_d *param);
const char *dev_get_param(struct device_d *dev, const char *name);
@@ -63,8 +65,6 @@ struct param_d *dev_add_param_enum(struct device_d *dev, const char *name,
int (*get)(struct param_d *p, void *priv),
int *value, const char * const *names, int max, void *priv);
-enum param_tristate { PARAM_TRISTATE_UNKNOWN, PARAM_TRISTATE_TRUE, PARAM_TRISTATE_FALSE };
-
struct param_d *dev_add_param_tristate(struct device_d *dev, const char *name,
int (*set)(struct param_d *p, void *priv),
int (*get)(struct param_d *p, void *priv),