aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc4xx_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/ppc4xx_pci.c
parent6e4ec3f9bb32d6f41e4fb30b872d2b7b084bc9a9 (diff)
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ppc4xx_pci.c')
-rw-r--r--hw/ppc4xx_pci.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/hw/ppc4xx_pci.c b/hw/ppc4xx_pci.c
index 26de007c0f..b38840e866 100644
--- a/hw/ppc4xx_pci.c
+++ b/hw/ppc4xx_pci.c
@@ -366,13 +366,20 @@ static int ppc4xx_pcihost_initfn(SysBusDevice *dev)
return 0;
}
-static PCIDeviceInfo ppc4xx_host_bridge_info = {
- .qdev.name = "ppc4xx-host-bridge",
- .qdev.desc = "Host bridge",
- .qdev.size = sizeof(PCIDevice),
- .vendor_id = PCI_VENDOR_ID_IBM,
- .device_id = PCI_DEVICE_ID_IBM_440GX,
- .class_id = PCI_CLASS_BRIDGE_OTHER,
+static void ppc4xx_host_bridge_class_init(ObjectClass *klass, void *data)
+{
+ PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+
+ k->vendor_id = PCI_VENDOR_ID_IBM;
+ k->device_id = PCI_DEVICE_ID_IBM_440GX;
+ k->class_id = PCI_CLASS_BRIDGE_OTHER;
+}
+
+static DeviceInfo ppc4xx_host_bridge_info = {
+ .name = "ppc4xx-host-bridge",
+ .desc = "Host bridge",
+ .size = sizeof(PCIDevice),
+ .class_init = ppc4xx_host_bridge_class_init,
};
static SysBusDeviceInfo ppc4xx_pcihost_info = {