diff options
Diffstat (limited to 'hw/marvell_88w8618_audio.c')
-rw-r--r-- | hw/marvell_88w8618_audio.c | 29 |
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) |