From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4qXq-0004EP-L1 for qemu-devel@nongnu.org; Fri, 24 Aug 2012 05:51:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4qXm-0003JD-Pi for qemu-devel@nongnu.org; Fri, 24 Aug 2012 05:51:14 -0400 Received: from mail-iy0-f173.google.com ([209.85.210.173]:48959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4qXm-0003J8-L4 for qemu-devel@nongnu.org; Fri, 24 Aug 2012 05:51:10 -0400 Received: by iakx26 with SMTP id x26so2920370iak.4 for ; Fri, 24 Aug 2012 02:51:10 -0700 (PDT) From: Liu Ping Fan Date: Fri, 24 Aug 2012 17:49:20 +0800 Message-Id: <1345801763-24227-8-git-send-email-qemulist@gmail.com> In-Reply-To: <1345801763-24227-1-git-send-email-qemulist@gmail.com> References: <1345801763-24227-1-git-send-email-qemulist@gmail.com> Subject: [Qemu-devel] [PATCH 07/10] unplug: using new intf qdev_delete_subtree in acpi_piix_eject_slot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Liu Ping Fan , Avi Kivity , Anthony Liguori From: Liu Ping Fan We are not long to force to delete the obj at that place, just let its refcnt handle this issue. Signed-off-by: Liu Ping Fan --- hw/acpi_piix4.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 0aace60..f00d4d8 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -305,8 +305,11 @@ static void acpi_piix_eject_slot(PIIX4PMState *s, unsigned slots) if (pc->no_hotplug) { slot_free = false; } else { +#if 0 object_unparent(OBJECT(dev)); qdev_free(qdev); +#endif + qdev_delete_subtree(qdev); } } } -- 1.7.4.4