summaryrefslogtreecommitdiff
path: root/hw/pl181.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/pl181.c
parent40021f08882aaef93c66c8c740087b6d3031b63a (diff)
downloadqemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.tar.gz
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/pl181.c')
-rw-r--r--hw/pl181.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/hw/pl181.c b/hw/pl181.c
index b79aa418fa..973d3fcf0e 100644
--- a/hw/pl181.c
+++ b/hw/pl181.c
@@ -487,18 +487,25 @@ static int pl181_init(SysBusDevice *dev)
return 0;
}
-static SysBusDeviceInfo pl181_info = {
- .init = pl181_init,
- .qdev.name = "pl181",
- .qdev.size = sizeof(pl181_state),
- .qdev.vmsd = &vmstate_pl181,
- .qdev.reset = pl181_reset,
- .qdev.no_user = 1,
+static void pl181_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
+
+ sdc->init = pl181_init;
+}
+
+static DeviceInfo pl181_info = {
+ .name = "pl181",
+ .size = sizeof(pl181_state),
+ .class_init = pl181_class_init,
+ .vmsd = &vmstate_pl181,
+ .reset = pl181_reset,
+ .no_user = 1,
};
static void pl181_register_devices(void)
{
- sysbus_register_withprop(&pl181_info);
+ sysbus_qdev_register(&pl181_info);
}
device_init(pl181_register_devices)