diff options
Diffstat (limited to 'common/state')
-rw-r--r-- | common/state/state.c | 3 | ||||
-rw-r--r-- | common/state/state_variables.c | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/common/state/state.c b/common/state/state.c index 55804a5213..1597197ca2 100644 --- a/common/state/state.c +++ b/common/state/state.c @@ -311,7 +311,7 @@ static int state_convert_node_variable(struct state *state, if ((conv == STATE_CONVERT_TO_NODE) || (conv == STATE_CONVERT_FIXUP)) { ret = of_property_write_string(new_node, "type", - vtype->type_name); + vtype->type_name); if (ret) goto out; @@ -583,6 +583,7 @@ void state_release(struct state *state) /* * state_new_from_node - create a new state instance from a device_node * + * @node The device_node describing the new state instance * @readonly This is a read-only state. Note that with this option set, * there are no repairs done. */ diff --git a/common/state/state_variables.c b/common/state/state_variables.c index de9ba4ab61..abd714ceda 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; } |