diff options
Diffstat (limited to 'include/of_live.h')
-rw-r--r-- | include/of_live.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/of_live.h b/include/of_live.h index b2b9679ae84..f59d6af3350 100644 --- a/include/of_live.h +++ b/include/of_live.h @@ -20,4 +20,20 @@ struct device_node; */ int of_live_build(const void *fdt_blob, struct device_node **rootp); +/** + * unflatten_device_tree() - create tree of device_nodes from flat blob + * + * Note that this allocates a single block of memory, pointed to by *mynodes. + * To free the tree, use free(*mynodes) + * + * unflattens a device-tree, creating the + * tree of struct device_node. It also fills the "name" and "type" + * pointers of the nodes so the normal device-tree walking functions + * can be used. + * @blob: The blob to expand + * @mynodes: The device_node tree created by the call + * Return: 0 if OK, -ve on error + */ +int unflatten_device_tree(const void *blob, struct device_node **mynodes); + #endif |