dm: core: Avoid creating a name property when unflattening
The current implementation creates a 'name' value for every node. This is not needed for the latest device tree format, which includes a name in the node header. Adjust the code to point the name at the node header instead. Also simplify ofnode_get_name(), now that we can rely on it to set the name correctly. Update the comment to make it clear what name the root node has. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -356,7 +356,7 @@ const char *ofnode_get_name(ofnode node)
|
||||
}
|
||||
|
||||
if (ofnode_is_np(node))
|
||||
return strrchr(node.np->full_name, '/') + 1;
|
||||
return node.np->name;
|
||||
|
||||
return fdt_get_name(gd->fdt_blob, ofnode_to_offset(node), NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user