Message ID | 20180524055017.8801-8-amitay@ozlabs.org |
---|---|
State | Accepted |
Headers | show |
Series | Some more cleanups | expand |
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);
This automatically sorts targets in increasing index order. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> --- libpdbg/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)