[Pdbg] [RFC 05/12] device.c: Extend dt_expand to operate with different root nodes

Alistair Popple alistair at popple.id.au
Tue Aug 6 11:37:16 AEST 2019


Signed-off-by: Alistair Popple <alistair at popple.id.au>
---
 libpdbg/device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libpdbg/device.c b/libpdbg/device.c
index 07f373d..2fcb184 100644
--- a/libpdbg/device.c
+++ b/libpdbg/device.c
@@ -574,11 +574,11 @@ static int dt_expand_node(struct pdbg_target *node, const void *fdt, int fdt_nod
 	return nextoffset;
 }
 
-static void dt_expand(const void *fdt)
+static void dt_expand(void *root, const void *fdt)
 {
 	PR_DEBUG("FDT: Parsing fdt @%p\n", fdt);
 
-	if (dt_expand_node(pdbg_dt_root, fdt, 0) < 0)
+	if (dt_expand_node(root, fdt, 0) < 0)
 		abort();
 }
 
@@ -634,7 +634,7 @@ void pdbg_targets_init(void *fdt)
 		return;
 	}
 
-	dt_expand(fdt);
+	dt_expand(pdbg_dt_root, fdt);
 }
 
 char *pdbg_target_path(const struct pdbg_target *target)
-- 
2.20.1



More information about the Pdbg mailing list