[PATCH] Catch notification of memory add event of ACPI via container driver. (avoid redundant call add_memory)
[PATCH] Catch notification of memory add event of ACPI via container driver. (avoid redundant call add_memory)

When acpi_memory_device_init() is called at boottime to register struct
memory acpi_memory_device, acpi_bus_add() are called via
acpi_driver_attach().

But it also calls ops->start() function.  It is called even if the memory
blocks are initialized at early boottime.  In this case add_memory() return
-EEXIST, and the memory blocks becomes INVALID state even if it is normal.

This is patch to avoid calling add_memory() for already available memory.

[5c1e68b099950c134891f0b6e179498a8ebe9cf9@osdl.org: coding cleanups]
Signed-off-by: Yasunori Goto <5e8c143c1cccd8ccee45b5a7b90115158373a5d7@jp.fujitsu.com>
Cc: "Brown, Len" <b060cfa1096cc6e8be83699ddb4ed8a77dd63af5@intel.com>
Cc: Dave Hansen <e169c2064f54e292652f83bb35eed10e1aa33f38@us.ibm.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@osdl.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@osdl.org>

KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas