mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
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>
This commit is contained in:
parent
9eaeb07a71
commit
ae0b5908de
3 changed files with 131 additions and 174 deletions
|
@ -130,6 +130,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 */
|
||||
/**********************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue