aboutsummaryrefslogtreecommitdiff
path: root/hw/bonito.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-01-24 13:12:29 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:50 -0600
commit999e12bbe85c5dcf49bef13bce4f97399c7105f4 (patch)
tree73b6ed8633a73134e9f728baa1ed2b1dab58b5b0 /hw/bonito.c
parent40021f08882aaef93c66c8c740087b6d3031b63a (diff)
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus. Converting subclasses independently of their base class is prohibitively hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/bonito.c')
-rw-r--r--hw/bonito.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/hw/bonito.c b/hw/bonito.c
index 23384ecb5b..0333a2ed8f 100644
--- a/hw/bonito.c
+++ b/hw/bonito.c
@@ -786,11 +786,18 @@ static DeviceInfo bonito_info = {
.class_init = bonito_class_init,
};
-static SysBusDeviceInfo bonito_pcihost_info = {
- .init = bonito_pcihost_initfn,
- .qdev.name = "Bonito-pcihost",
- .qdev.size = sizeof(BonitoState),
- .qdev.no_user = 1,
+static void bonito_pcihost_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
+
+ k->init = bonito_pcihost_initfn;
+}
+
+static DeviceInfo bonito_pcihost_info = {
+ .name = "Bonito-pcihost",
+ .size = sizeof(BonitoState),
+ .no_user = 1,
+ .class_init = bonito_pcihost_class_init,
};
static void bonito_register(void)