From patchwork Tue Jun 4 18:52:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 248819 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8F8B32C0082 for ; Wed, 5 Jun 2013 04:57:59 +1000 (EST) Received: from localhost ([::1]:54233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwQf-0006K3-Ob for incoming@patchwork.ozlabs.org; Tue, 04 Jun 2013 14:57:57 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=AU/l/0fZ215bY8H2YTRPTbqCMcxf8Ui32C3bDqKoTng=; b=a81A54FD1i6VvIkzKGnwFnSFcai14kjfuJrn19Qg4hNRXk8uaiRxMW+y1OjBiL8xo6 p8rjZ38w3aOsetmy/tfEKUx9I0CwdTb3vozKIj+qbK71BcT8PlT1GayURPbE29b9O4e6 DZrVQzAGpomvkKXRdsOYHGhXsooVonLXuthKl5lMHj02nWo4HaRTUG8FyVvb4bVuBTCr +t3xGwG2jz3BOLlpISeOzdDqPqWy8KiOSL/BIAlWL6xxGcNKaBNsVf361arWOjJzgRWI rKNc/4vuvUxQugUcnbDPmi3qkuf1gi2e9kqHvzXXiTODCF7vUZGFeDCx4/RBdMI9aFkx TV0A== X-Received: by 10.180.208.109 with SMTP id md13mr2355589wic.57.1370372006325; Tue, 04 Jun 2013 11:53:26 -0700 (PDT) Received: from playground.lan (net-37-116-217-184.cust.dsl.vodafone.it. [37.116.217.184]) by mx.google.com with ESMTPSA id fx7sm4590484wic.11.2013.06.04.11.53.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 04 Jun 2013 11:53:25 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2013 20:52:15 +0200 Message-Id: <1370371954-8479-21-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1370371954-8479-1-git-send-email-pbonzini@redhat.com> References: <1370371954-8479-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::22f Cc: mst@redhat.com Subject: [Qemu-devel] [PATCH 20/39] ne2000: use instance_finalize instead of exit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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)