aboutsummaryrefslogtreecommitdiff
path: root/hw/versatilepb.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/versatilepb.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/versatilepb.c')
-rw-r--r--hw/versatilepb.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/hw/versatilepb.c b/hw/versatilepb.c
index 0312b7564a..3f7490c829 100644
--- a/hw/versatilepb.c
+++ b/hw/versatilepb.c
@@ -365,12 +365,19 @@ static void versatile_machine_init(void)
machine_init(versatile_machine_init);
-static SysBusDeviceInfo vpb_sic_info = {
- .init = vpb_sic_init,
- .qdev.name = "versatilepb_sic",
- .qdev.size = sizeof(vpb_sic_state),
- .qdev.vmsd = &vmstate_vpb_sic,
- .qdev.no_user = 1,
+static void vpb_sic_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
+
+ k->init = vpb_sic_init;
+}
+
+static DeviceInfo vpb_sic_info = {
+ .name = "versatilepb_sic",
+ .size = sizeof(vpb_sic_state),
+ .vmsd = &vmstate_vpb_sic,
+ .no_user = 1,
+ .class_init = vpb_sic_class_init,
};
static void versatilepb_register_devices(void)