diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-09-10 15:13:02 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-09-29 09:07:40 +0200 |
commit | 2a34749fca7b05f09112fb42f7b6ac130eda1ebc (patch) | |
tree | 1c4441e9251e1ea5e9e6ea5f99c111f4db71cf30 | |
parent | b62aea561142c6974b593301fbec9ed18381cf8d (diff) | |
download | barebox-2a34749fca7b05f09112fb42f7b6ac130eda1ebc.tar.gz barebox-2a34749fca7b05f09112fb42f7b6ac130eda1ebc.tar.xz |
state: write names in enum32 variables to oftree again
Commit 179b75a (state: fixup: only export default value during
fixup if set) accidently removed writing the enum32 value names
to the device tree. Add it back again
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | common/state.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/state.c b/common/state.c index aa436fcd9a..9f8ead1500 100644 --- a/common/state.c +++ b/common/state.c @@ -259,13 +259,6 @@ static int state_enum32_export(struct state_variable *var, return ret; } - if (conv == STATE_CONVERT_FIXUP) - return 0; - - ret = of_property_write_u32(node, "value", enum32->value); - if (ret) - return ret; - len = 0; for (i = 0; i < enum32->num_names; i++) @@ -281,6 +274,13 @@ static int state_enum32_export(struct state_variable *var, free(prop); + if (conv == STATE_CONVERT_FIXUP) + return 0; + + ret = of_property_write_u32(node, "value", enum32->value); + if (ret) + return ret; + return ret; } |