summary refs log tree commit diff stats
path: root/hw/sh_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sh_pci.c')
-rw-r--r--hw/sh_pci.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/hw/sh_pci.c b/hw/sh_pci.c
index a849176afd..4234d935e7 100644
--- a/hw/sh_pci.c
+++ b/hw/sh_pci.c
@@ -156,10 +156,11 @@ static void sh_pci_host_class_init(ObjectClass *klass, void *data)
     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 TypeInfo sh_pci_host_info = {
+    .name          = "sh_pci_host",
+    .parent        = TYPE_PCI_DEVICE,
+    .instance_size = sizeof(PCIDevice),
+    .class_init    = sh_pci_host_class_init,
 };
 
 static void sh_pci_device_class_init(ObjectClass *klass, void *data)
@@ -169,16 +170,17 @@ static void sh_pci_device_class_init(ObjectClass *klass, void *data)
     sdc->init = sh_pci_device_init;
 }
 
-static DeviceInfo sh_pci_device_info = {
-    .name = "sh_pci",
-    .size = sizeof(SHPCIState),
-    .class_init = sh_pci_device_class_init,
+static TypeInfo sh_pci_device_info = {
+    .name          = "sh_pci",
+    .parent        = TYPE_SYS_BUS_DEVICE,
+    .instance_size = sizeof(SHPCIState),
+    .class_init    = sh_pci_device_class_init,
 };
 
 static void sh_pci_register_devices(void)
 {
-    sysbus_qdev_register(&sh_pci_device_info);
-    pci_qdev_register(&sh_pci_host_info);
+    type_register_static(&sh_pci_device_info);
+    type_register_static(&sh_pci_host_info);
 }
 
 device_init(sh_pci_register_devices)