From mboxrd@z Thu Jan 1 00:00:00 1970 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) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 4 Jun 2013 20:52:24 +0200 Message-Id: <1370371954-8479-30-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 29/39] xio3130-downstream: split exit and instance_finalize 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/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) -- 1.8.1.4