summaryrefslogtreecommitdiffstats
path: root/common/state
diff options
context:
space:
mode:
authorUlrich Ölmann <u.oelmann@pengutronix.de>2018-10-11 09:13:02 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-10-12 09:10:43 +0200
commitebe29c846eeb2256e6f459dfbd16405949952b75 (patch)
tree26c818986060b7913bd52a3dc5702ed116b355a0 /common/state
parent97bac649f284b413b5c51b0087c92af1703e3165 (diff)
downloadbarebox-ebe29c846eeb2256e6f459dfbd16405949952b75.tar.gz
common: state: use of_property_write_string() where appropriate
See commit b6089182316d ("treewide: Use of_property_write_string() where appropriate"). Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/state')
-rw-r--r--common/state/state_variables.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/state/state_variables.c b/common/state/state_variables.c
index de9ba4a..abd714c 100644
--- a/common/state/state_variables.c
+++ b/common/state/state_variables.c
@@ -339,8 +339,7 @@ static int state_string_export(struct state_variable *var,
int ret = 0;
if (string->value_default) {
- ret = of_set_property(node, "default", string->value_default,
- strlen(string->value_default) + 1, 1);
+ ret = of_property_write_string(node, "default", string->value_default);
if (ret)
return ret;
@@ -350,8 +349,7 @@ static int state_string_export(struct state_variable *var,
return 0;
if (string->value)
- ret = of_set_property(node, "value", string->value,
- strlen(string->value) + 1, 1);
+ ret = of_property_write_string(node, "value", string->value);
return ret;
}