summaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-08-24 00:02:27 +0200
committerAndreas Färber <afaerber@suse.de>2013-08-30 21:15:35 +0200
commitfb17dfe0575243a3f60dcefca37fa82ae682f146 (patch)
treee2b1bc60fe8cd608b5655c475793667da9f696ad /hw/core
parente5f720391e0628131cb6548b3d27be6aa56ae7d4 (diff)
downloadqemu-fb17dfe0575243a3f60dcefca37fa82ae682f146.tar.gz
qemu-fb17dfe0575243a3f60dcefca37fa82ae682f146.tar.bz2
qemu-fb17dfe0575243a3f60dcefca37fa82ae682f146.zip
qdev: Pass size to qbus_create_inplace()
To be passed to object_initialize(). Since commit 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 the argument is void*, so drop some superfluous (BusState *) casts or direct parent field usages. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/qdev.c2
-rw-r--r--hw/core/sysbus.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 758de9fccc..81874da5ea 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -470,7 +470,7 @@ static void bus_unparent(Object *obj)
}
}
-void qbus_create_inplace(void *bus, const char *typename,
+void qbus_create_inplace(void *bus, size_t size, const char *typename,
DeviceState *parent, const char *name)
{
object_initialize(bus, typename);
diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index 9004d8c543..b84cd4a16f 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -276,8 +276,8 @@ static void main_system_bus_create(void)
/* assign main_system_bus before qbus_create_inplace()
* in order to make "if (bus != sysbus_get_default())" work */
main_system_bus = g_malloc0(system_bus_info.instance_size);
- qbus_create_inplace(main_system_bus, TYPE_SYSTEM_BUS, NULL,
- "main-system-bus");
+ qbus_create_inplace(main_system_bus, system_bus_info.instance_size,
+ TYPE_SYSTEM_BUS, NULL, "main-system-bus");
OBJECT(main_system_bus)->free = g_free;
object_property_add_child(container_get(qdev_get_machine(),
"/unattached"),