of: Create unlocked versions of node and property add/remove functions
authorPantelis Antoniou <pantelis.antoniou@konsulko.com>
Fri, 4 Jul 2014 16:58:46 +0000 (19:58 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 16 Feb 2015 05:43:16 +0000 (14:43 +0900)
commit2189e1a0f168cae1857ac0bf2bc85e898734465f
tree95e669ec26e4cb319dafb0f6e448dc4f11d49b20
parent24648be8b3cf70f2e6c5e57a49e927cfcc780abb
of: Create unlocked versions of node and property add/remove functions

The DT overlay code will need to manipulate nodes and properties while
already holding the devicetree lock, or on nodes that are not yet
attached to the tree, but the current helper functions don't allow that.
Extract the core behaviour from the accessors and create the following
unlocked variants.

The unlocked variants require either the lock to already be held or for
the nodes to be detached from the tree. Changes to live nodes will not
get updated in sysfs, so the caller must arrange for housekeeping to
take place after dropping the lock.

The new functions are: __of_add_property(), __of_remove_property(),
__of_update_property(), __of_attach_node() and __of_detach_node().

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
[Remove unnecessary diff hunks and rewrite commit text]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
(cherry picked from commit d8c50088417ebf61ad8b132caad20d10f7736034)
Signed-off-by: Mark Brown <broonie@kernel.org>
Conflicts:
drivers/of/base.c
drivers/of/base.c
drivers/of/dynamic.c
drivers/of/of_private.h