From patchwork Wed Oct 19 02:53:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pingfank@linux.vnet.ibm.com X-Patchwork-Id: 120550 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 96A46B71CD for ; Wed, 19 Oct 2011 13:55:14 +1100 (EST) Received: from localhost ([::1]:32901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGMIq-0007rW-7e for incoming@patchwork.ozlabs.org; Tue, 18 Oct 2011 22:54:48 -0400 Received: from eggs.gnu.org ([140.186.70.92]:44757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGMIk-0007rL-5K for qemu-devel@nongnu.org; Tue, 18 Oct 2011 22:54:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGMIi-0001iZ-O3 for qemu-devel@nongnu.org; Tue, 18 Oct 2011 22:54:42 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:50501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGMIh-0001iG-PF for qemu-devel@nongnu.org; Tue, 18 Oct 2011 22:54:40 -0400 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by e28smtp03.in.ibm.com (8.14.4/8.13.1) with ESMTP id p9J2sa1d006593 for ; Wed, 19 Oct 2011 08:24:36 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9J2saV44731128 for ; Wed, 19 Oct 2011 08:24:36 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9J2sZVE006895 for ; Wed, 19 Oct 2011 13:54:36 +1100 Received: from oc8440477808.ibm.com ([9.115.122.42]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p9J2sXvJ005856; Wed, 19 Oct 2011 13:54:34 +1100 From: pingfank@linux.vnet.ibm.com To: linux-kernel@vger.kernel.org, seabios@seabios.org, lenb@kernel.org, shaohua.li@intel.com Date: Wed, 19 Oct 2011 10:53:41 +0800 Message-Id: <1318992821-10552-2-git-send-email-pingfank@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1318992821-10552-1-git-send-email-pingfank@linux.vnet.ibm.com> References: <1318992821-10552-1-git-send-email-pingfank@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 122.248.162.3 Cc: aliguori@us.ibm.com, Liu Ping Fan , qemu-devel@nongnu.org, dave@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH 1/1] ACPI: Call ACPI remove handler when handling ACPI eject event 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 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 */