From patchwork Tue Jun 4 18:52:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 248850 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 924602C0079 for ; Wed, 5 Jun 2013 05:46:52 +1000 (EST) Received: from localhost ([::1]:54277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwZp-0004ja-4K for incoming@patchwork.ozlabs.org; Tue, 04 Jun 2013 15:07:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwMb-0008QH-C2 for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjwMa-0007or-C8 for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:45 -0400 Received: from mail-we0-x22c.google.com ([2a00:1450:400c:c03::22c]:39274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjwMa-0007of-5i for qemu-devel@nongnu.org; Tue, 04 Jun 2013 14:53:44 -0400 Received: by mail-we0-f172.google.com with SMTP id q56so556985wes.3 for ; Tue, 04 Jun 2013 11:53:43 -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=WV4xRBK+rjulp+/FIC4hi8TbnVEsgPNxyD7UzIpYmU4=; b=rO3NCFYXVpPD07fy3E0DT4CKl9k89uW4sKhf+flfuwshr/qZMCmFwiSrWnQ3sBMvO1 Bt13u+AXOp/vH/MgBubDjLpPZ0qypePiLGgsB7tZd63FqMm+YtK2SIIpKuArBkkhqa/K rcDnY1gsuxx5IhMHcLvfPdCUbJaoqudBUicpmo3qL7OARxUAHdBhACr727t/dWw9T4Y1 0C2F1MzThyCvhomybxIyYSMZUMCcPT4euZamLJpUf09bHa24FS6NvNTCbEHaAh4Q8wjr an2CZNV06GwVjS67GA7D1B9dejQx67WsYuCjzzpDUqLw8uP0clcwiafcEzlL+GgKeBvP IVSA== X-Received: by 10.180.184.101 with SMTP id et5mr2860934wic.45.1370372023501; Tue, 04 Jun 2013 11:53:43 -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.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 04 Jun 2013 11:53:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2013 20:52:24 +0200 Message-Id: <1370371954-8479-30-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::22c Cc: mst@redhat.com Subject: [Qemu-devel] [PATCH 29/39] xio3130-downstream: split exit and instance_finalize 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/pci-bridge/xio3130_downstream.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_downstream.c index 6ff336f..477cb12 100644 --- a/hw/pci-bridge/xio3130_downstream.c +++ b/hw/pci-bridge/xio3130_downstream.c @@ -122,6 +122,12 @@ static void xio3130_downstream_exitfn(PCIDevice *d) pcie_cap_exit(d); msi_uninit(d); pci_bridge_exitfn(d); +} + +static void xio3130_downstream_instance_finalize(Object *obj) +{ + PCIDevice *d = PCI_DEVICE(obj); + pcie_aer_free(d); pci_bridge_free(d); } @@ -200,6 +206,7 @@ static const TypeInfo xio3130_downstream_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIESlot), .class_init = xio3130_downstream_class_init, + .instance_finalize = xio3130_downstream_instance_finalize, }; static void xio3130_downstream_register_types(void)