From 649bbd05bdd9b64aa3263282a6cafc80a6c02d7a Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Thu, 16 Aug 2018 15:57:54 +1000 Subject: 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 --- libpdbg/device.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'libpdbg/device.c') 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); -- cgit v1.2.1