aboutsummaryrefslogtreecommitdiff
path: root/hw/zaurus.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/zaurus.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/zaurus.c')
-rw-r--r--hw/zaurus.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/hw/zaurus.c b/hw/zaurus.c
index c4bcd29825..b14240c9c6 100644
--- a/hw/zaurus.c
+++ b/hw/zaurus.c
@@ -221,15 +221,24 @@ static const VMStateDescription vmstate_scoop_regs = {
},
};
-static SysBusDeviceInfo scoop_sysbus_info = {
- .init = scoop_init,
- .qdev.name = "scoop",
- .qdev.desc = "Scoop2 Sharp custom ASIC",
- .qdev.size = sizeof(ScoopInfo),
- .qdev.vmsd = &vmstate_scoop_regs,
- .qdev.props = (Property[]) {
- DEFINE_PROP_END_OF_LIST(),
- }
+static Property scoop_sysbus_properties[] = {
+ DEFINE_PROP_END_OF_LIST(),
+};
+
+static void scoop_sysbus_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
+
+ k->init = scoop_init;
+}
+
+static DeviceInfo scoop_sysbus_info = {
+ .name = "scoop",
+ .desc = "Scoop2 Sharp custom ASIC",
+ .size = sizeof(ScoopInfo),
+ .vmsd = &vmstate_scoop_regs,
+ .props = scoop_sysbus_properties,
+ .class_init = scoop_sysbus_class_init,
};
static void scoop_register(void)