aboutsummaryrefslogtreecommitdiff
path: root/hw/marvell_88w8618_audio.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/marvell_88w8618_audio.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/marvell_88w8618_audio.c')
-rw-r--r--hw/marvell_88w8618_audio.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/hw/marvell_88w8618_audio.c b/hw/marvell_88w8618_audio.c
index 409b1eb19b..355e492054 100644
--- a/hw/marvell_88w8618_audio.c
+++ b/hw/marvell_88w8618_audio.c
@@ -272,16 +272,25 @@ static const VMStateDescription mv88w8618_audio_vmsd = {
}
};
-static SysBusDeviceInfo mv88w8618_audio_info = {
- .init = mv88w8618_audio_init,
- .qdev.name = "mv88w8618_audio",
- .qdev.size = sizeof(mv88w8618_audio_state),
- .qdev.reset = mv88w8618_audio_reset,
- .qdev.vmsd = &mv88w8618_audio_vmsd,
- .qdev.props = (Property[]) {
- DEFINE_PROP_PTR("wm8750", mv88w8618_audio_state, wm),
- {/* end of list */}
- }
+static Property mv88w8618_audio_properties[] = {
+ DEFINE_PROP_PTR("wm8750", mv88w8618_audio_state, wm),
+ {/* end of list */},
+};
+
+static void mv88w8618_audio_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
+
+ k->init = mv88w8618_audio_init;
+}
+
+static DeviceInfo mv88w8618_audio_info = {
+ .name = "mv88w8618_audio",
+ .size = sizeof(mv88w8618_audio_state),
+ .reset = mv88w8618_audio_reset,
+ .vmsd = &mv88w8618_audio_vmsd,
+ .props = mv88w8618_audio_properties,
+ .class_init = mv88w8618_audio_class_init,
};
static void mv88w8618_register_devices(void)