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/mipsnet.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/mipsnet.c')
-rw-r--r-- | hw/mipsnet.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/hw/mipsnet.c b/hw/mipsnet.c index 0f80cfe43a..8cf9161a06 100644 --- a/hw/mipsnet.c +++ b/hw/mipsnet.c @@ -252,17 +252,26 @@ static void mipsnet_sysbus_reset(DeviceState *dev) mipsnet_reset(s); } -static SysBusDeviceInfo mipsnet_info = { - .init = mipsnet_sysbus_init, - .qdev.name = "mipsnet", - .qdev.desc = "MIPS Simulator network device", - .qdev.size = sizeof(MIPSnetState), - .qdev.vmsd = &vmstate_mipsnet, - .qdev.reset = mipsnet_sysbus_reset, - .qdev.props = (Property[]) { - DEFINE_NIC_PROPERTIES(MIPSnetState, conf), - DEFINE_PROP_END_OF_LIST(), - } +static Property mipsnet_properties[] = { + DEFINE_NIC_PROPERTIES(MIPSnetState, conf), + DEFINE_PROP_END_OF_LIST(), +}; + +static void mipsnet_class_init(ObjectClass *klass, void *data) +{ + SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); + + k->init = mipsnet_sysbus_init; +} + +static DeviceInfo mipsnet_info = { + .name = "mipsnet", + .desc = "MIPS Simulator network device", + .size = sizeof(MIPSnetState), + .vmsd = &vmstate_mipsnet, + .reset = mipsnet_sysbus_reset, + .props = mipsnet_properties, + .class_init = mipsnet_class_init, }; static void mipsnet_register_devices(void) |