summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-06-13 16:04:11 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-06-14 09:31:39 +0200
commit91412f96e326dd83c924542cd6934b08aca28597 (patch)
treeab7c32915c1150cbd5cab74bf7a257e238ce170c
parent685f1eaabc85354dc1107088ab053b81fa1ec834 (diff)
downloadbarebox-91412f96e326dd83c924542cd6934b08aca28597.tar.gz
Revert "globalvar: don't use nv_device if CONFIG_NVVAR is disabled"
This reverts commit b378e8c9427b45d856d052a6df4a879a2cee670c.
-rw-r--r--common/globalvar.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/common/globalvar.c b/common/globalvar.c
index aad19c6..aa389be 100644
--- a/common/globalvar.c
+++ b/common/globalvar.c
@@ -99,9 +99,6 @@ void dev_param_init_from_nv(struct device_d *dev, const char *name)
const char *val;
int ret = 0;
- if (!IS_ENABLED(CONFIG_NVVAR))
- return;
-
if (dev == &nv_device)
return;
if (dev == &global_device)
@@ -398,9 +395,6 @@ static void globalvar_nv_sync(const char *name)
{
const char *val;
- if (!IS_ENABLED(CONFIG_NVVAR))
- return;
-
val = dev_get_param(&nv_device, name);
if (val)
dev_set_param(&global_device, name, val);
@@ -548,8 +542,6 @@ int nvvar_save(void)
const char *env = default_environment_path_get();
int ret;
#define TMPDIR "/.env.tmp"
- if (!IS_ENABLED(CONFIG_NVVAR))
- return -ENOSYS;
if (!nv_dirty || !env)
return 0;
@@ -610,9 +602,7 @@ static int nv_global_param_complete(struct device_d *dev, struct string_list *sl
int nv_global_complete(struct string_list *sl, char *instr)
{
nv_global_param_complete(&global_device, sl, instr, 0);
-
- if (IS_ENABLED(CONFIG_NVVAR))
- nv_global_param_complete(&nv_device, sl, instr, 0);
+ nv_global_param_complete(&nv_device, sl, instr, 0);
return 0;
}