[Pdbg] [PATCH v3 07/11] libpdbg/device: Add new targets in the order of traversal
Amitay Isaacs
amitay at ozlabs.org
Thu May 24 15:50:13 AEST 2018
This automatically sorts targets in increasing index order.
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libpdbg/device.c b/libpdbg/device.c
index 7ee4884..e5b78f4 100644
--- a/libpdbg/device.c
+++ b/libpdbg/device.c
@@ -96,7 +96,7 @@ static struct pdbg_target *new_node(const char *name, const void *fdt, int node_
* above DECLARE_HW_UNIT). */
memcpy(node, hw_info->hw_unit, size);
target_class = get_target_class(node->class);
- list_add(&target_class->targets, &node->class_link);
+ list_add_tail(&target_class->targets, &node->class_link);
}
node->dn_name = take_name(name);
--
2.17.0
More information about the Pdbg
mailing list