From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpoO-00073W-KY for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGpoG-0006Ui-6b for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:24 -0400 Received: from mail-ee0-x22b.google.com ([2a00:1450:4013:c00::22b]:38707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpoG-0006UW-03 for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:16 -0400 Received: by mail-ee0-f43.google.com with SMTP id e52so2967553eek.30 for ; Tue, 03 Sep 2013 05:34:15 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 3 Sep 2013 14:33:12 +0200 Message-Id: <1378211609-16121-22-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 21/38] rtl8139: 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/net/rtl8139.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index c31199f..af76d7d 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -3456,9 +3456,9 @@ static void rtl8139_cleanup(NetClientState *nc) s->nic = NULL; } -static void pci_rtl8139_uninit(PCIDevice *dev) +static void pci_rtl8139_instance_finalize(Object *obj) { - RTL8139State *s = RTL8139(dev); + RTL8139State *s = RTL8139(obj); memory_region_destroy(&s->bar_io); memory_region_destroy(&s->bar_mem); @@ -3554,7 +3554,6 @@ static void rtl8139_class_init(ObjectClass *klass, void *data) PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->init = pci_rtl8139_init; - k->exit = pci_rtl8139_uninit; k->romfile = "efi-rtl8139.rom"; k->vendor_id = PCI_VENDOR_ID_REALTEK; k->device_id = PCI_DEVICE_ID_REALTEK_8139; @@ -3571,6 +3570,7 @@ static const TypeInfo rtl8139_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(RTL8139State), .class_init = rtl8139_class_init, + .instance_finalize = pci_rtl8139_instance_finalize, }; static void rtl8139_register_types(void) -- 1.8.3.1