qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 8/8] qdev: Add new devices/buses at the tail


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH 8/8] qdev: Add new devices/buses at the tail
Date: Fri, 14 May 2010 15:20:52 +0200

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 <address@hidden>
---
 hw/qdev.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/qdev.c b/hw/qdev.c
index c989010..3864478 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -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++;
     }
 
-- 
1.6.0.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]