summaryrefslogtreecommitdiffstats
path: root/drivers/of/of_private.h
diff options
context:
space:
mode:
authorPantelis Antoniou <pantelis.antoniou@konsulko.com>2014-07-04 19:58:47 +0300
committerGrant Likely <grant.likely@linaro.org>2014-07-16 08:16:17 -0600
commit698433963b98d6de7b102c242805c99fda4fa1fb (patch)
tree05a223f160742f6659e47cd5accc245934c941ef /drivers/of/of_private.h
parent6afc0dc381573559251de9a8259404f49e6aed14 (diff)
downloadtalos-obmc-linux-698433963b98d6de7b102c242805c99fda4fa1fb.tar.gz
talos-obmc-linux-698433963b98d6de7b102c242805c99fda4fa1fb.zip
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>
Diffstat (limited to 'drivers/of/of_private.h')
-rw-r--r--drivers/of/of_private.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index c270f2037779..1799ed2b3808 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -51,4 +51,14 @@ static inline int of_property_notify(int action, struct device_node *np,
}
#endif /* CONFIG_OF_DYNAMIC */
+/**
+ * General utilities for working with live trees.
+ *
+ * All functions with two leading underscores operate
+ * without taking node references, so you either have to
+ * own the devtree lock or work on detached trees only.
+ */
+struct property *__of_prop_dup(const struct property *prop, gfp_t allocflags);
+struct device_node *__of_node_alloc(const char *full_name, gfp_t allocflags);
+
#endif /* _LINUX_OF_PRIVATE_H */
OpenPOWER on IntegriCloud