From patchwork Tue Jun 4 18:52:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 248845 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 505622C0040 for ; Wed, 5 Jun 2013 05:15:24 +1000 (EST) Received: from localhost ([::1]:40139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwUs-0005SO-FR for incoming@patchwork.ozlabs.org; Tue, 04 Jun 2013 15:02:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwMN-00080y-Vg for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjwMM-0007hn-Vt for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:31 -0400 Received: from mail-we0-x230.google.com ([2a00:1450:400c:c03::230]:34757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwMM-0007he-Pq for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:30 -0400 Received: by mail-we0-f176.google.com with SMTP id t56so537509wes.21 for ; Tue, 04 Jun 2013 11:53:30 -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=PZXZ0Xku8BCG10Y3CnXIeDHDYIrJe2rQCcFAhl96am0=; b=0rjjWgRMZnyUtHnh8W9cIoL72GbqH33zRk0eKmZdenzu24E1qWZrw3xutscdgMEVlt lbbTbJrgW/SZkd4wEvYmM1LHu4u7mKXkzbPKu1y2itGFSe6rFs79pO/GssGO3SO95a1G zyBZ0zqiHJsfxbee4ATyF8hXCyO6DEsWRK+WqMsSkyHGgLOT6p0evio/Ptpv7CLzZP+S Q1FtfuvZxDLu6O9y3r37l5yRkFV8MhnZd/k4zD22049FHx7gPfsx4ZABMfQa3Jpydog+ uYRnbeHttX7GCQSW1NzmvvwrJlnbRXGZI0cZeqPIteZRwlS3uY5jpOhT/QrtvKkEdLrr 6Xrw== X-Received: by 10.180.21.167 with SMTP id w7mr2934939wie.2.1370372010015; Tue, 04 Jun 2013 11:53:30 -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.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 04 Jun 2013 11:53:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2013 20:52:17 +0200 Message-Id: <1370371954-8479-23-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::230 Cc: mst@redhat.com Subject: [Qemu-devel] [PATCH 22/39] rtl8139: 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/rtl8139.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 7993f9f..c1c4921 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -3437,8 +3437,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) { + PCIDevice *dev = PCI_DEVICE(obj); RTL8139State *s = DO_UPCAST(RTL8139State, dev, dev); memory_region_destroy(&s->bar_io); @@ -3532,7 +3533,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; @@ -3548,6 +3548,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)