qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 13/39] ide/piix: use instance_finalize instead of ex


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 13/39] ide/piix: use instance_finalize instead of exit
Date: Tue, 4 Jun 2013 20:52:08 +0200

Signed-off-by: Paolo Bonzini <address@hidden>
---
 hw/ide/piix.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index bf2856f..a0550c6 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -201,8 +201,9 @@ PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo 
**hd_table, int devfn)
     return dev;
 }
 
-static void pci_piix_ide_exitfn(PCIDevice *dev)
+static void pci_piix_ide_instance_finalize(Object *obj)
 {
+    PCIDevice *dev = PCI_DEVICE(obj);
     PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, dev);
     unsigned i;
 
@@ -244,7 +245,6 @@ static void piix3_ide_class_init(ObjectClass *klass, void 
*data)
 
     k->no_hotplug = 1;
     k->init = pci_piix_ide_initfn;
-    k->exit = pci_piix_ide_exitfn;
     k->vendor_id = PCI_VENDOR_ID_INTEL;
     k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
     k->class_id = PCI_CLASS_STORAGE_IDE;
@@ -256,6 +256,7 @@ static const TypeInfo piix3_ide_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIIDEState),
     .class_init    = piix3_ide_class_init,
+    .instance_finalize = pci_piix_ide_instance_finalize,
 };
 
 static void piix3_ide_xen_class_init(ObjectClass *klass, void *data)
@@ -276,6 +277,7 @@ static const TypeInfo piix3_ide_xen_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIIDEState),
     .class_init    = piix3_ide_xen_class_init,
+    .instance_finalize = pci_piix_ide_instance_finalize,
 };
 
 static void piix4_ide_class_init(ObjectClass *klass, void *data)
@@ -285,7 +287,6 @@ static void piix4_ide_class_init(ObjectClass *klass, void 
*data)
 
     k->no_hotplug = 1;
     k->init = pci_piix_ide_initfn;
-    k->exit = pci_piix_ide_exitfn;
     k->vendor_id = PCI_VENDOR_ID_INTEL;
     k->device_id = PCI_DEVICE_ID_INTEL_82371AB;
     k->class_id = PCI_CLASS_STORAGE_IDE;
@@ -297,6 +298,7 @@ static const TypeInfo piix4_ide_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIIDEState),
     .class_init    = piix4_ide_class_init,
+    .instance_finalize = pci_piix_ide_instance_finalize,
 };
 
 static void piix_ide_register_types(void)
-- 
1.8.1.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]