summaryrefslogtreecommitdiffstats
path: root/drivers/of/fdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r--drivers/of/fdt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 2f3b076399..8dca41990c 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -730,6 +730,17 @@ int fdt_machine_is_compatible(const struct fdt_header *fdt, size_t fdt_size, con
dt_struct = dt_struct_advance(&f, dt_struct,
sizeof(struct fdt_node_header) + 1);
+ /*
+ * Quoting Device Tree Specification v0.4 ยง5.4.2:
+ *
+ * [T]his process requires that all property definitions for
+ * a particular node precede any subnode definitions for that
+ * node. Although the structure would not be ambiguous if
+ * properties and subnodes were intermingled, the code needed
+ * to process a flat tree is simplified by this requirement.
+ *
+ * So let's make use of this simplification.
+ */
expect = FDT_PROP;
break;