mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] common: state: use of_property_write_string() where appropriate
@ 2018-10-11  7:13 Ulrich Ölmann
  2018-10-12  7:10 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Ölmann @ 2018-10-11  7:13 UTC (permalink / raw)
  To: Barebox List

See commit b6089182316d ("treewide: Use of_property_write_string() where
appropriate").

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
---
 common/state/state_variables.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/common/state/state_variables.c b/common/state/state_variables.c
index de9ba4ab61ac..abd714ceda1e 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;
 }
-- 
2.19.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-12  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11  7:13 [PATCH] common: state: use of_property_write_string() where appropriate Ulrich Ölmann
2018-10-12  7:10 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox