From 64b625f4b2fdb2c873e25c149648b2ce923faab7 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 23 Nov 2012 09:47:15 +0100 Subject: 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 Signed-off-by: Anthony Liguori --- hw/sysbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/sysbus.c') 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); -- cgit 1.4.1