OF: Utility helper functions for dynamic nodes
authorPantelis Antoniou <pantelis.antoniou@konsulko.com>
Fri, 4 Jul 2014 16:58:47 +0000 (19:58 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 16 Feb 2015 05:05:04 +0000 (14:05 +0900)
commitf713f5e8d237c51e985a96199a276250a7756c32
tree4226e6e4db5ec455e9678190f463b3d7894329d4
parent5078857c32c8c26d01642d69420c64230ff515c5
OF: Utility helper functions for dynamic nodes

Introduce helper functions for working with the live DT tree,
all of them related to dynamically adding/removing nodes and
properties.

__of_prop_dup() copies a property dynamically
__of_node_alloc() creates an empty node

Bug fix about prop->len == 0 by Ionut Nicu <ioan.nicu.ext@nsn.com>

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
[glikely: Added unittest for of_copy_property and dropped fine-grained allocations]
[glikely: removed name, type and phandle arguments from __of_node_alloc]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
(cherry picked from commit 698433963b98d6de7b102c242805c99fda4fa1fb)
Signed-off-by: Mark Brown <broonie@kernel.org>
Conflicts:
drivers/of/selftest.c
drivers/of/dynamic.c
drivers/of/of_private.h
drivers/of/selftest.c