From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwMK-0007tW-2S for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjwMJ-0007h9-7Z for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:27 -0400 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:56680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwMJ-0007h5-22 for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:27 -0400 Received: by mail-wg0-f47.google.com with SMTP id e11so560764wgh.14 for ; Tue, 04 Jun 2013 11:53:26 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 4 Jun 2013 20:52:15 +0200 Message-Id: <1370371954-8479-21-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 20/39] 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 33ee03e..aded2da 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; @@ -779,6 +779,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.1.4