aboutsummaryrefslogtreecommitdiff
path: root/hw/lsi53c895a.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/lsi53c895a.c
parent6e4ec3f9bb32d6f41e4fb30b872d2b7b084bc9a9 (diff)
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/lsi53c895a.c')
-rw-r--r--hw/lsi53c895a.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 3a87171a24..3571588b12 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -2120,18 +2120,25 @@ static int lsi_scsi_init(PCIDevice *dev)
return 0;
}
-static PCIDeviceInfo lsi_info = {
- .qdev.name = "lsi53c895a",
- .qdev.alias = "lsi",
- .qdev.size = sizeof(LSIState),
- .qdev.reset = lsi_scsi_reset,
- .qdev.vmsd = &vmstate_lsi_scsi,
- .init = lsi_scsi_init,
- .exit = lsi_scsi_uninit,
- .vendor_id = PCI_VENDOR_ID_LSI_LOGIC,
- .device_id = PCI_DEVICE_ID_LSI_53C895A,
- .class_id = PCI_CLASS_STORAGE_SCSI,
- .subsystem_id = 0x1000,
+static void lsi_class_init(ObjectClass *klass, void *data)
+{
+ PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+
+ k->init = lsi_scsi_init;
+ k->exit = lsi_scsi_uninit;
+ k->vendor_id = PCI_VENDOR_ID_LSI_LOGIC;
+ k->device_id = PCI_DEVICE_ID_LSI_53C895A;
+ k->class_id = PCI_CLASS_STORAGE_SCSI;
+ k->subsystem_id = 0x1000;
+}
+
+static DeviceInfo lsi_info = {
+ .name = "lsi53c895a",
+ .alias = "lsi",
+ .size = sizeof(LSIState),
+ .reset = lsi_scsi_reset,
+ .vmsd = &vmstate_lsi_scsi,
+ .class_init = lsi_class_init,
};
static void lsi53c895a_register_devices(void)