@@ -91,7 +91,7 @@ static DeviceState *qdev_create_from_info(BusState *bus, DeviceInfo *info)
qdev_prop_set_defaults(dev, dev->info->props);
qdev_prop_set_defaults(dev, dev->parent_bus->info->props);
qdev_prop_set_globals(dev);
- QLIST_INSERT_HEAD(&bus->children, dev, sibling);
+ QLIST_INSERT_TAIL(&bus->children, dev, sibling);
if (qdev_hotplug) {
assert(bus->allow_hotplug);
dev->hotplugged = 1;
@@ -677,7 +677,7 @@ void qbus_create_inplace(BusState *bus, BusInfo *info,
QLIST_INIT(&bus->children);
if (parent) {
- QLIST_INSERT_HEAD(&parent->child_bus, bus, sibling);
+ QLIST_INSERT_TAIL(&parent->child_bus, bus, sibling);
parent->num_child_bus++;
}
Cosmetic change to align the instance number assignment with bus ordering. The current ordering is a bit annoying when you dump the qtree or address devices via 'driver.instance'. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- hw/qdev.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)