Patchwork [13/38] ide/via: use instance_finalize instead of exit

login
register
mail settings
Submitter Paolo Bonzini
Date Sept. 3, 2013, 12:33 p.m.
Message ID <1378211609-16121-14-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/272219/
State New
Headers show

Comments

Paolo Bonzini - Sept. 3, 2013, 12:33 p.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/ide/via.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/ide/via.c b/hw/ide/via.c
index e5fb297..0b63bee 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -191,9 +191,9 @@  static int vt82c686b_ide_initfn(PCIDevice *dev)
     return 0;
 }
 
-static void vt82c686b_ide_exitfn(PCIDevice *dev)
+static void vt82c686b_ide_instance_finalize(Object *obj)
 {
-    PCIIDEState *d = PCI_IDE(dev);
+    PCIIDEState *d = PCI_IDE(obj);
     unsigned i;
 
     for (i = 0; i < 2; ++i) {
@@ -219,7 +219,6 @@  static void via_ide_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
     k->init = vt82c686b_ide_initfn;
-    k->exit = vt82c686b_ide_exitfn;
     k->vendor_id = PCI_VENDOR_ID_VIA;
     k->device_id = PCI_DEVICE_ID_VIA_IDE;
     k->revision = 0x06;
@@ -232,6 +231,7 @@  static const TypeInfo via_ide_info = {
     .name          = "via-ide",
     .parent        = TYPE_PCI_IDE,
     .class_init    = via_ide_class_init,
+    .instance_finalize = vt82c686b_ide_instance_finalize,
 };
 
 static void via_ide_register_types(void)