aboutsummaryrefslogtreecommitdiff
path: root/hw/sh_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/sh_pci.c
parent6e4ec3f9bb32d6f41e4fb30b872d2b7b084bc9a9 (diff)
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/sh_pci.c')
-rw-r--r--hw/sh_pci.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/hw/sh_pci.c b/hw/sh_pci.c
index d4d028d811..baeab9e30f 100644
--- a/hw/sh_pci.c
+++ b/hw/sh_pci.c
@@ -147,12 +147,19 @@ static int sh_pci_host_init(PCIDevice *d)
return 0;
}
-static PCIDeviceInfo sh_pci_host_info = {
- .qdev.name = "sh_pci_host",
- .qdev.size = sizeof(PCIDevice),
- .init = sh_pci_host_init,
- .vendor_id = PCI_VENDOR_ID_HITACHI,
- .device_id = PCI_DEVICE_ID_HITACHI_SH7751R,
+static void sh_pci_host_class_init(ObjectClass *klass, void *data)
+{
+ PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+
+ k->init = sh_pci_host_init;
+ k->vendor_id = PCI_VENDOR_ID_HITACHI;
+ k->device_id = PCI_DEVICE_ID_HITACHI_SH7751R;
+}
+
+static DeviceInfo sh_pci_host_info = {
+ .name = "sh_pci_host",
+ .size = sizeof(PCIDevice),
+ .class_init = sh_pci_host_class_init,
};
static void sh_pci_register_devices(void)