aboutsummaryrefslogtreecommitdiff
path: root/hw/prep_pci.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-04 12:22:06 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:50 -0600
commit40021f08882aaef93c66c8c740087b6d3031b63a (patch)
treea0429c040df66503d807770a3b89da9a0c70d8ac /hw/prep_pci.c
parent6e4ec3f9bb32d6f41e4fb30b872d2b7b084bc9a9 (diff)
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.c33
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 = {