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/usb-ohci.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/usb-ohci.c')
-rw-r--r-- | hw/usb-ohci.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index b9b37d5acf..3437da1586 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -1861,12 +1861,19 @@ static DeviceInfo ohci_pci_info = { .class_init = ohci_pci_class_init, }; -static SysBusDeviceInfo ohci_sysbus_info = { - .init = ohci_init_pxa, - .qdev.name = "sysbus-ohci", - .qdev.desc = "OHCI USB Controller", - .qdev.size = sizeof(OHCISysBusState), - .qdev.props = (Property[]) { +static void ohci_sysbus_class_init(ObjectClass *klass, void *data) +{ + SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass); + + sbc->init = ohci_init_pxa; +} + +static DeviceInfo ohci_sysbus_info = { + .name = "sysbus-ohci", + .desc = "OHCI USB Controller", + .size = sizeof(OHCISysBusState), + .class_init = ohci_sysbus_class_init, + .props = (Property[]) { DEFINE_PROP_UINT32("num-ports", OHCISysBusState, num_ports, 3), DEFINE_PROP_TADDR("dma-offset", OHCISysBusState, dma_offset, 3), DEFINE_PROP_END_OF_LIST(), |