The combination of get_param_by_name()/param->set() can be replaced by using dev_set_param() Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- common/globalvar.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/common/globalvar.c b/common/globalvar.c index decd73c..6687b03 100644 --- a/common/globalvar.c +++ b/common/globalvar.c @@ -70,17 +70,12 @@ static int nv_save(const char *name, const char *val) static int nv_set(struct device_d *dev, struct param_d *p, const char *val) { - struct param_d *gp; int ret; if (!val) val = ""; - gp = get_param_by_name(&global_device, p->name); - if (!gp) - return -EINVAL; - - ret = gp->set(&global_device, gp, val); + ret = dev_set_param(&global_device, p->name, val); if (ret) return ret; -- 2.8.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox