From patchwork Fri Jul 20 07:11:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFC, 5/8] memory-hotplug: call acpi_bus_remove() to remove memory device Date: Thu, 19 Jul 2012 21:11:40 -0000 From: Wen Congyang X-Patchwork-Id: 172142 Message-Id: <500904AC.7000305@cn.fujitsu.com> To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org Cc: len.brown@intel.com, Yasuaki ISIMATU , paulus@samba.org, minchan.kim@gmail.com, kosaki.motohiro@jp.fujitsu.com, rientjes@google.com, cl@linux.com, akpm@linux-foundation.org, liuj97@gmail.com The memory device has been ejected and powoffed, so we can call acpi_bus_remove() to remove the memory device from acpi bus. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Ishimatsu Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 58e4e63..431a17c 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -402,8 +402,9 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) printk(KERN_ERR PREFIX "Disable memory device\n"); /* - * TBD: Invoke acpi_bus_remove to cleanup data structures + * Invoke acpi_bus_remove() to remove memory device */ + acpi_bus_remove(device, 1); break; default: ACPI_DEBUG_PRINT((ACPI_DB_INFO,