aboutsummaryrefslogtreecommitdiff
path: root/hw/gt64xxx.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/gt64xxx.c
parent6e4ec3f9bb32d6f41e4fb30b872d2b7b084bc9a9 (diff)
downloadqemu-40021f08882aaef93c66c8c740087b6d3031b63a.zip
qemu-40021f08882aaef93c66c8c740087b6d3031b63a.tar.gz
qemu-40021f08882aaef93c66c8c740087b6d3031b63a.tar.bz2
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/gt64xxx.c')
-rw-r--r--hw/gt64xxx.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c
index 432683a..9fc51f2 100644
--- a/hw/gt64xxx.c
+++ b/hw/gt64xxx.c
@@ -1136,14 +1136,21 @@ static int gt64120_pci_init(PCIDevice *d)
return 0;
}
-static PCIDeviceInfo gt64120_pci_info = {
- .qdev.name = "gt64120_pci",
- .qdev.size = sizeof(PCIDevice),
- .init = gt64120_pci_init,
- .vendor_id = PCI_VENDOR_ID_MARVELL,
- .device_id = PCI_DEVICE_ID_MARVELL_GT6412X,
- .revision = 0x10,
- .class_id = PCI_CLASS_BRIDGE_HOST,
+static void gt64120_pci_class_init(ObjectClass *klass, void *data)
+{
+ PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+
+ k->init = gt64120_pci_init;
+ k->vendor_id = PCI_VENDOR_ID_MARVELL;
+ k->device_id = PCI_DEVICE_ID_MARVELL_GT6412X;
+ k->revision = 0x10;
+ k->class_id = PCI_CLASS_BRIDGE_HOST;
+}
+
+static DeviceInfo gt64120_pci_info = {
+ .name = "gt64120_pci",
+ .size = sizeof(PCIDevice),
+ .class_init = gt64120_pci_class_init,
};
static void gt64120_pci_register_devices(void)