diff mbox series

[3/5] device.c: Extend dt_expand to operate with different root nodes

Message ID 20190820071906.25950-3-alistair@popple.id.au
State Accepted
Headers show
Series [1/5] libpdbg: Rename adu class to mem | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (e005e0863a44f04c931b09804f258fb1c0b6f14c)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Alistair Popple Aug. 20, 2019, 7:19 a.m. UTC
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

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)