From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwLq-00070R-2H for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:52:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjwLo-0007E2-TY for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:52:57 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:35045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwLo-0007Dq-Nh for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:52:56 -0400 Received: by mail-wi0-f182.google.com with SMTP id c10so530677wiw.15 for ; Tue, 04 Jun 2013 11:52:55 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 4 Jun 2013 20:51:59 +0200 Message-Id: <1370371954-8479-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1370371954-8479-1-git-send-email-pbonzini@redhat.com> References: <1370371954-8479-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 04/39] ac97: use instance_finalize instead of exit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com Signed-off-by: Paolo Bonzini --- hw/audio/ac97.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index baf138b..f53ca74 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -1388,8 +1388,9 @@ static int ac97_initfn (PCIDevice *dev) return 0; } -static void ac97_exitfn (PCIDevice *dev) +static void ac97_instance_finalize (Object *obj) { + PCIDevice *dev = PCI_DEVICE(obj); AC97LinkState *s = DO_UPCAST (AC97LinkState, dev, dev); memory_region_destroy (&s->io_nam); @@ -1413,7 +1414,6 @@ static void ac97_class_init (ObjectClass *klass, void *data) PCIDeviceClass *k = PCI_DEVICE_CLASS (klass); k->init = ac97_initfn; - k->exit = ac97_exitfn; k->vendor_id = PCI_VENDOR_ID_INTEL; k->device_id = PCI_DEVICE_ID_INTEL_82801AA_5; k->revision = 0x01; @@ -1428,6 +1428,7 @@ static const TypeInfo ac97_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof (AC97LinkState), .class_init = ac97_class_init, + .instance_finalize = ac97_instance_finalize, }; static void ac97_register_types (void) -- 1.8.1.4