[PATCH 1/2] state: write names in enum32 variables to oftree again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
Cc: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
---
 common/state.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/common/state.c b/common/state.c
index aa436fc..9f8ead1 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;
 }
 
-- 
2.5.1


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux