[RFC PATCH v5 07/19] memory-hotplug: call acpi_bus_remove() to remove memory device

Wen Congyang wency at cn.fujitsu.com
Fri Jul 27 20:29:32 EST 2012


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 <rientjes at google.com>
CC: Jiang Liu <liuj97 at gmail.com>
CC: Len Brown <len.brown at intel.com>
CC: Benjamin Herrenschmidt <benh at kernel.crashing.org>
CC: Paul Mackerras <paulus at samba.org>
CC: Christoph Lameter <cl at linux.com>
Cc: Minchan Kim <minchan.kim at gmail.com>
CC: Andrew Morton <akpm at linux-foundation.org>
CC: KOSAKI Motohiro <kosaki.motohiro at jp.fujitsu.com>
CC: Yasuaki Ishimatsu <isimatu.yasuaki at jp.fujitsu.com>
Signed-off-by: Wen Congyang <wency at cn.fujitsu.com>
---
 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 ed37fc2..755cc31 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -423,8 +423,9 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
 		}
 
 		/*
-		 * TBD: Invoke acpi_bus_remove to cleanup data structures
+		 * Invoke acpi_bus_remove() to remove memory device
 		 */
+		acpi_bus_remove(device, 1);
 
 		/* _EJ0 succeeded; _OST is not necessary */
 		return;
-- 
1.7.1



More information about the Linuxppc-dev mailing list