From fb17dfe0575243a3f60dcefca37fa82ae682f146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 24 Aug 2013 00:02:27 +0200 Subject: qdev: Pass size to qbus_create_inplace() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- hw/core/qdev.c | 2 +- hw/core/sysbus.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/core') 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"), -- cgit v1.2.1