aboutsummaryrefslogtreecommitdiff
path: root/libfdt/libfdt.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2008-02-12 11:58:31 +1100
committerJon Loeliger <jdl@freescale.com>2008-02-12 09:11:40 -0600
commitfc9769ac2bae8a32d5d277007d22414c4516b02b (patch)
treef59054c75a9397d6c2bd96653ac9a417e0d27e1f /libfdt/libfdt.h
parent202863e4dd681d17c06a82943f49485bf7860633 (diff)
downloaddtc-fc9769ac2bae8a32d5d277007d22414c4516b02b.zip
dtc-fc9769ac2bae8a32d5d277007d22414c4516b02b.tar.gz
dtc-fc9769ac2bae8a32d5d277007d22414c4516b02b.tar.bz2
libfdt: Add and use a node iteration helper function.
This patch adds an fdt_next_node() function which can be used to iterate through nodes of the tree while keeping track of depth. This function is used to simplify the iteration code in a lot of other functions, and is also exported for use by library users. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'libfdt/libfdt.h')
-rw-r--r--libfdt/libfdt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h
index d053689..8645de0 100644
--- a/libfdt/libfdt.h
+++ b/libfdt/libfdt.h
@@ -131,6 +131,12 @@ static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset);
/**********************************************************************/
+/* Traversal functions */
+/**********************************************************************/
+
+int fdt_next_node(const void *fdt, int offset, int *depth);
+
+/**********************************************************************/
/* General functions */
/**********************************************************************/