From patchwork Tue Jun 4 18:52:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 248838 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 9892D2C0040 for ; Wed, 5 Jun 2013 05:09:01 +1000 (EST) Received: from localhost ([::1]:57419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwbL-0006Ti-LS for incoming@patchwork.ozlabs.org; Tue, 04 Jun 2013 15:08:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwMM-0007w2-0p for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjwML-0007hS-39 for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:29 -0400 Received: from mail-we0-x235.google.com ([2a00:1450:400c:c03::235]:45989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwMK-0007hN-T5 for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:29 -0400 Received: by mail-we0-f181.google.com with SMTP id p58so565521wes.12 for ; Tue, 04 Jun 2013 11:53:28 -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=/T9Kt+qzef4B8PVYbqXbxIwPy9xDb7lYhGzIVMMiAOw=; b=iZVKbH8na/UIThWixVl5HrlDZ7zcK82ViCSey7lC1/4pOwQs2MMxEBim9GlIu4DIPo 7lvDF70wf98BHdNV5Y57YGmGsiMuhoUEKFUW/PfVhdnj1eUdqEQmq5kRDYm2kJBoExXG p98NIMCVI36ZmEhGkhmWnpEH+TiSTF0RLx3e3/RmgZXyYZHcy29bphL9lYo9o4tfoVUE zQNB6H3zmIhGmc0iBaOTivCf5+RaeTMPz2BdeTkyR3TpLMxmjSgjOjg5Gl9+MnO0boBO Qp1Qm+MTAQbyo2gsBh54WRnwFwgCxJ/rv2CHTNfw8sax4h1Wwbl2jXaCD/bsuBSbpTIR RRfA== X-Received: by 10.194.249.231 with SMTP id yx7mr14694316wjc.13.1370372008214; Tue, 04 Jun 2013 11:53:28 -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.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 04 Jun 2013 11:53:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2013 20:52:16 +0200 Message-Id: <1370371954-8479-22-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:c03::235 Cc: mst@redhat.com Subject: [Qemu-devel] [PATCH 21/39] pcnet: 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/pcnet-pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c index 9df2b87..2cd2927 100644 --- a/hw/net/pcnet-pci.c +++ b/hw/net/pcnet-pci.c @@ -271,8 +271,9 @@ static void pci_pcnet_cleanup(NetClientState *nc) pcnet_common_cleanup(d); } -static void pci_pcnet_uninit(PCIDevice *dev) +static void pci_pcnet_instance_finalize(Object *obj) { + PCIDevice *dev = PCI_DEVICE(obj); PCIPCNetState *d = DO_UPCAST(PCIPCNetState, pci_dev, dev); memory_region_destroy(&d->state.mmio); @@ -350,7 +351,6 @@ static void pcnet_class_init(ObjectClass *klass, void *data) PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->init = pci_pcnet_init; - k->exit = pci_pcnet_uninit; k->romfile = "efi-pcnet.rom", k->vendor_id = PCI_VENDOR_ID_AMD; k->device_id = PCI_DEVICE_ID_AMD_LANCE; @@ -366,6 +366,7 @@ static const TypeInfo pcnet_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIPCNetState), .class_init = pcnet_class_init, + .instance_finalize = pci_pcnet_instance_finalize, }; static void pci_pcnet_register_types(void)