summaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorAnthony Liguori <anthony@codemonkey.ws>2013-09-03 12:30:51 -0500
committerAnthony Liguori <anthony@codemonkey.ws>2013-09-03 12:30:51 -0500
commit5cff81f098a57762ab937bfbedb298e658af2c7f (patch)
tree5b4af366b2fd084e72c601744bb6ba56bcee3413 /hw/core
parent545825d4cda03ea292b7788b3401b99860efe8bc (diff)
parent520902a656f21bdd4f212bfa55bc35c3e567affc (diff)
downloadqemu-5cff81f098a57762ab937bfbedb298e658af2c7f.tar.gz
Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging
QOM device refactorings * Fix QOM and ISA documentation errors * Extend object_initialize() et al. to check the instance size # gpg: Signature made Fri 30 Aug 2013 02:19:48 PM CDT using RSA key ID 3E7E013F # gpg: Can't check signature: public key not found # By Andreas Färber (14) and others # Via Andreas Färber * afaerber/tags/qom-devices-for-anthony: isa: Fix documentation of isa_register_portio_list() qom: Assert instance size in object_initialize_with_type() qom: Pass available size to object_initialize() qdev: Pass size to qbus_create_inplace() virtio-mmio: Pass size to virtio_mmio_bus_new() virtio-ccw: Pass size to virtio_ccw_bus_new() s390-virtio-bus: Pass size to virtio_s390_bus_new() virtio-pci: Pass size to virtio_pci_bus_new() usb: Pass size to usb_bus_new() scsi: Pass size to scsi_bus_new() pci: Pass size to pci_bus_new_inplace() ide: Pass size to ide_bus_new() ipack: Pass size to ipack_bus_new_inplace() intel-hda: Pass size to hda_codec_bus_init() qom: Fix object_initialize_with_type() argument name in documentation virtio: Remove unnecessary OBJECT() casts object: Fix typo in qom/object.h
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/qdev.c4
-rw-r--r--hw/core/sysbus.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 758de9fccc..533f6dd122 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -470,10 +470,10 @@ 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);
+ object_initialize(bus, size, typename);
qbus_realize(bus, parent, name);
}
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"),