From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpoK-0006wP-Sp for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGpoC-0006Tk-F4 for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:20 -0400 Received: from mail-ea0-x236.google.com ([2a00:1450:4013:c01::236]:49167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpoC-0006Ta-8e for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:12 -0400 Received: by mail-ea0-f182.google.com with SMTP id o10so3007503eaj.27 for ; Tue, 03 Sep 2013 05:34:11 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 3 Sep 2013 14:33:10 +0200 Message-Id: <1378211609-16121-20-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 19/38] ne2000: 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/ne2000.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index 31afd28..3a2597e 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -745,8 +745,9 @@ static int pci_ne2000_init(PCIDevice *pci_dev) return 0; } -static void pci_ne2000_exit(PCIDevice *pci_dev) +static void pci_ne2000_instance_finalize(Object *obj) { + PCIDevice *pci_dev = PCI_DEVICE(obj); PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev); NE2000State *s = &d->ne2000; @@ -765,7 +766,6 @@ static void ne2000_class_init(ObjectClass *klass, void *data) PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->init = pci_ne2000_init; - k->exit = pci_ne2000_exit; k->romfile = "efi-ne2k_pci.rom", k->vendor_id = PCI_VENDOR_ID_REALTEK; k->device_id = PCI_DEVICE_ID_REALTEK_8029; @@ -780,6 +780,7 @@ static const TypeInfo ne2000_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCINE2000State), .class_init = ne2000_class_init, + .instance_finalize = pci_ne2000_instance_finalize, }; static void ne2000_register_types(void) -- 1.8.3.1