diff options
author | Anthony Liguori | 2011-12-04 19:22:06 +0100 |
---|---|---|
committer | Anthony Liguori | 2012-01-27 17:50:50 +0100 |
commit | 40021f08882aaef93c66c8c740087b6d3031b63a (patch) | |
tree | a0429c040df66503d807770a3b89da9a0c70d8ac /hw/prep_pci.c | |
parent | unin_pci: Drop unused reset handler (diff) | |
download | qemu-40021f08882aaef93c66c8c740087b6d3031b63a.tar.gz qemu-40021f08882aaef93c66c8c740087b6d3031b63a.tar.xz qemu-40021f08882aaef93c66c8c740087b6d3031b63a.zip |
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/prep_pci.c')
-rw-r--r-- | hw/prep_pci.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/hw/prep_pci.c b/hw/prep_pci.c index 4961eede8c..4ff104904a 100644 --- a/hw/prep_pci.c +++ b/hw/prep_pci.c @@ -134,21 +134,24 @@ static const VMStateDescription vmstate_raven = { }, }; -static PCIDeviceInfo raven_info = { - .qdev.name = "raven", - .qdev.desc = "PReP Host Bridge - Motorola Raven", - .qdev.size = sizeof(RavenPCIState), - .qdev.vmsd = &vmstate_raven, - .qdev.no_user = 1, - .no_hotplug = 1, - .init = raven_init, - .vendor_id = PCI_VENDOR_ID_MOTOROLA, - .device_id = PCI_DEVICE_ID_MOTOROLA_RAVEN, - .revision = 0x00, - .class_id = PCI_CLASS_BRIDGE_HOST, - .qdev.props = (Property[]) { - DEFINE_PROP_END_OF_LIST() - }, +static void raven_class_init(ObjectClass *klass, void *data) +{ + PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); + + k->init = raven_init; + k->vendor_id = PCI_VENDOR_ID_MOTOROLA; + k->device_id = PCI_DEVICE_ID_MOTOROLA_RAVEN; + k->revision = 0x00; + k->class_id = PCI_CLASS_BRIDGE_HOST; +} + +static DeviceInfo raven_info = { + .name = "raven", + .desc = "PReP Host Bridge - Motorola Raven", + .size = sizeof(RavenPCIState), + .vmsd = &vmstate_raven, + .no_user = 1, + .class_init = raven_class_init, }; static SysBusDeviceInfo raven_pcihost_info = { |