From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpns-0006H3-5D for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGpnj-0006LA-HR for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:33:52 -0400 Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]:54144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpnj-0006KF-AY for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:33:43 -0400 Received: by mail-ea0-f176.google.com with SMTP id q16so2952104ead.21 for ; Tue, 03 Sep 2013 05:33:42 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 3 Sep 2013 14:32:54 +0200 Message-Id: <1378211609-16121-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> References: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 03/38] 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 01b4dfb..04ae601 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -1390,8 +1390,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); @@ -1415,7 +1416,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; @@ -1431,6 +1431,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.3.1