diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-24 13:12:29 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-27 10:50:50 -0600 |
commit | 999e12bbe85c5dcf49bef13bce4f97399c7105f4 (patch) | |
tree | 73b6ed8633a73134e9f728baa1ed2b1dab58b5b0 /hw/milkymist-vgafb.c | |
parent | 40021f08882aaef93c66c8c740087b6d3031b63a (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/milkymist-vgafb.c')
-rw-r--r-- | hw/milkymist-vgafb.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/hw/milkymist-vgafb.c b/hw/milkymist-vgafb.c index 108115e300..81d31fa10e 100644 --- a/hw/milkymist-vgafb.c +++ b/hw/milkymist-vgafb.c @@ -299,17 +299,26 @@ static const VMStateDescription vmstate_milkymist_vgafb = { } }; -static SysBusDeviceInfo milkymist_vgafb_info = { - .init = milkymist_vgafb_init, - .qdev.name = "milkymist-vgafb", - .qdev.size = sizeof(MilkymistVgafbState), - .qdev.vmsd = &vmstate_milkymist_vgafb, - .qdev.reset = milkymist_vgafb_reset, - .qdev.props = (Property[]) { - DEFINE_PROP_UINT32("fb_offset", MilkymistVgafbState, fb_offset, 0x0), - DEFINE_PROP_UINT32("fb_mask", MilkymistVgafbState, fb_mask, 0xffffffff), - DEFINE_PROP_END_OF_LIST(), - } +static Property milkymist_vgafb_properties[] = { + DEFINE_PROP_UINT32("fb_offset", MilkymistVgafbState, fb_offset, 0x0), + DEFINE_PROP_UINT32("fb_mask", MilkymistVgafbState, fb_mask, 0xffffffff), + DEFINE_PROP_END_OF_LIST(), +}; + +static void milkymist_vgafb_class_init(ObjectClass *klass, void *data) +{ + SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); + + k->init = milkymist_vgafb_init; +} + +static DeviceInfo milkymist_vgafb_info = { + .name = "milkymist-vgafb", + .size = sizeof(MilkymistVgafbState), + .vmsd = &vmstate_milkymist_vgafb, + .reset = milkymist_vgafb_reset, + .props = milkymist_vgafb_properties, + .class_init = milkymist_vgafb_class_init, }; static void milkymist_vgafb_register(void) |