diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/dm/ofnode.h | 9 | ||||
-rw-r--r-- | include/of_live.h | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 32917f6615..0b96ab34ed 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -128,6 +128,15 @@ static inline ofnode noffset_to_ofnode(ofnode other_node, int of_offset) #endif /* OFNODE_MULTI_TREE */ /** + * oftree_new() - Create a new, empty tree + * + * @treep: Returns a pointer to the tree, on success + * Returns: 0 on success, -ENOMEM if out of memory, -E2BIG if !OF_LIVE and + * there are too many (flattrees) already + */ +int oftree_new(oftree *treep); + +/** * ofnode_to_np() - convert an ofnode to a live DT node pointer * * This cannot be called if the reference contains an offset. diff --git a/include/of_live.h b/include/of_live.h index 05e86ac06b..81cb9bd13e 100644 --- a/include/of_live.h +++ b/include/of_live.h @@ -46,4 +46,12 @@ int unflatten_device_tree(const void *blob, struct device_node **mynodes); */ void of_live_free(struct device_node *root); +/** + * of_live_create_empty() - Create a new, empty tree + * + * @rootp: Returns the root node of the created tree + * Return: 0 if OK, -ENOMEM if out of memory + */ +int of_live_create_empty(struct device_node **rootp); + #endif |