summary refs log tree commit diff stats
path: root/hw/sysbus.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-11-23 09:47:15 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2012-11-26 13:41:00 -0600
commit64b625f4b2fdb2c873e25c149648b2ce923faab7 (patch)
treec0ecebd3d237877cba1d232454ae5dd43d27b43c /hw/sysbus.c
parentfde9bf4470d4a3b6ee1da0dee2370ab028b6314a (diff)
downloadfocaccia-qemu-64b625f4b2fdb2c873e25c149648b2ce923faab7.tar.gz
focaccia-qemu-64b625f4b2fdb2c873e25c149648b2ce923faab7.zip
qdev: simplify (de)allocation of buses
All conditional deallocation can now be done with object_delete.
Remove the @qom_allocated and @glib_allocated fields; replace the latter
with a direct assignment of the @free function pointer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/sysbus.c')
-rw-r--r--hw/sysbus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/sysbus.c b/hw/sysbus.c
index 4969f06a66..ef8ffb6603 100644
--- a/hw/sysbus.c
+++ b/hw/sysbus.c
@@ -274,7 +274,7 @@ static void main_system_bus_create(void)
     main_system_bus = g_malloc0(system_bus_info.instance_size);
     qbus_create_inplace(main_system_bus, TYPE_SYSTEM_BUS, NULL,
                         "main-system-bus");
-    main_system_bus->glib_allocated = true;
+    OBJECT(main_system_bus)->free = g_free;
     object_property_add_child(container_get(qdev_get_machine(),
                                             "/unattached"),
                               "sysbus", OBJECT(main_system_bus), NULL);