diff options
author | Amitay Isaacs <amitay@ozlabs.org> | 2018-08-16 15:57:54 +1000 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2018-09-07 13:42:16 +1000 |
commit | 649bbd05bdd9b64aa3263282a6cafc80a6c02d7a (patch) | |
tree | 18fa31e0fb04fb06bdba30ee1e6cd6a48417b833 /libpdbg/device.c | |
parent | cbfd622f286a990c28891cbe53711e11394e9e7a (diff) | |
download | pdbg-649bbd05bdd9b64aa3263282a6cafc80a6c02d7a.tar.gz pdbg-649bbd05bdd9b64aa3263282a6cafc80a6c02d7a.zip |
libpdbg: Rename dt_new_root to dt_new_node
dt_new_root is not really creating a new root node. It's just creating
a new node that is not attached to the tree.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Diffstat (limited to 'libpdbg/device.c')
-rw-r--r-- | libpdbg/device.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libpdbg/device.c b/libpdbg/device.c index e5b78f4..7442e29 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -51,7 +51,7 @@ static void free_name(const char *name) free((char *)name); } -static struct pdbg_target *new_node(const char *name, const void *fdt, int node_offset) +struct pdbg_target *dt_new_node(const char *name, const void *fdt, int node_offset) { struct hw_unit_info *hw_info = NULL; const struct fdt_property *prop; @@ -108,11 +108,6 @@ static struct pdbg_target *new_node(const char *name, const void *fdt, int node_ return node; } -struct pdbg_target *dt_new_root(const char *name, const void *fdt, int offset) -{ - return new_node(name, fdt, offset); -} - static const char *get_unitname(const struct pdbg_target *node) { const char *c = strchr(node->dn_name, '@'); @@ -771,7 +766,7 @@ int dt_expand_node(struct pdbg_target *node, const void *fdt, int fdt_node) break; case FDT_BEGIN_NODE: name = fdt_get_name(fdt, offset, NULL); - child = dt_new_root(name, fdt, offset); + child = dt_new_node(name, fdt, offset); assert(child); nextoffset = dt_expand_node(child, fdt, offset); |