aboutsummaryrefslogtreecommitdiff
path: root/hw/piix4.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/piix4.c')
-rw-r--r--hw/piix4.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/hw/piix4.c b/hw/piix4.c
index 130dfd1cc5..88be53587c 100644
--- a/hw/piix4.c
+++ b/hw/piix4.c
@@ -102,18 +102,24 @@ int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn)
return d->devfn;
}
-static PCIDeviceInfo piix4_info = {
- .qdev.name = "PIIX4",
- .qdev.desc = "ISA bridge",
- .qdev.size = sizeof(PIIX4State),
- .qdev.vmsd = &vmstate_piix4,
- .qdev.no_user = 1,
- .no_hotplug = 1,
- .init = piix4_initfn,
- .vendor_id = PCI_VENDOR_ID_INTEL,
- /* 82371AB/EB/MB PIIX4 PCI-to-ISA bridge */
- .device_id = PCI_DEVICE_ID_INTEL_82371AB_0,
- .class_id = PCI_CLASS_BRIDGE_ISA,
+static void piix4_class_init(ObjectClass *klass, void *data)
+{
+ PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+
+ k->no_hotplug = 1;
+ k->init = piix4_initfn;
+ k->vendor_id = PCI_VENDOR_ID_INTEL;
+ k->device_id = PCI_DEVICE_ID_INTEL_82371AB_0;
+ k->class_id = PCI_CLASS_BRIDGE_ISA;
+}
+
+static DeviceInfo piix4_info = {
+ .name = "PIIX4",
+ .desc = "ISA bridge",
+ .size = sizeof(PIIX4State),
+ .vmsd = &vmstate_piix4,
+ .no_user = 1,
+ .class_init = piix4_class_init,
};
static void piix4_register(void)