From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB2x6-0002Ij-GJ for qemu-devel@nongnu.org; Tue, 04 Oct 2011 07:14:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RB2x5-0000Bi-Ll for qemu-devel@nongnu.org; Tue, 04 Oct 2011 07:14:24 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:43678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB2x5-0000BU-3A for qemu-devel@nongnu.org; Tue, 04 Oct 2011 07:14:23 -0400 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id p94BD4cW030631 for ; Tue, 4 Oct 2011 22:13:04 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p94BEE9g2486500 for ; Tue, 4 Oct 2011 22:14:14 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p94BED90005219 for ; Tue, 4 Oct 2011 22:14:13 +1100 From: pingfank@linux.vnet.com Date: Tue, 4 Oct 2011 19:13:36 +0800 Message-Id: <1317726818-8514-2-git-send-email-pingfank@linux.vnet.com> In-Reply-To: <1317726818-8514-1-git-send-email-pingfank@linux.vnet.com> References: <1317726818-8514-1-git-send-email-pingfank@linux.vnet.com> Subject: [Qemu-devel] [PATCH] ACPI: Call ACPI remove handler when handling ACPI eject event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: linux-acpi@vger.kernel.org, qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, Liu Ping Fan , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, ryanh@us.ibm.com, shaohua.li@intel.com, lenb@kernel.org From: Liu Ping Fan Call the remove handler for ACPI_NOTIFY_EJECT_REQUEST Signed-off-by: Liu Ping Fan --- drivers/acpi/bus.c | 2 +- drivers/acpi/scan.c | 2 +- include/acpi/acpi_bus.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 437ddbf..d06ec6d 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -764,7 +764,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) break; case ACPI_NOTIFY_EJECT_REQUEST: - /* TBD */ + acpi_os_hotplug_execute(acpi_bus_hot_remove_device, handle); break; case ACPI_NOTIFY_DEVICE_CHECK_LIGHT: diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 449c556..3b97b61 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -83,7 +83,7 @@ acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, cha } static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL); -static void acpi_bus_hot_remove_device(void *context) +void acpi_bus_hot_remove_device(void *context) { struct acpi_device *device; acpi_handle handle = context; diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 6cd5b64..b19c09d 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -310,6 +310,8 @@ extern int unregister_acpi_notifier(struct notifier_block *); extern int register_acpi_bus_notifier(struct notifier_block *nb); extern void unregister_acpi_bus_notifier(struct notifier_block *nb); +extern void acpi_bus_hot_remove_device(void *context); + /* * External Functions */ -- 1.7.4.4