]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memory hotplug: suppress "Device memoryX does not have a release() function" warning
authorYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Thu, 25 Oct 2012 01:14:47 +0000 (12:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 31 Oct 2012 05:49:44 +0000 (16:49 +1100)
commita2de91740a51ee7b732d714c0f16ef9f6eeab56c
treee99f8c290b6650aa58e29c2e175408a6352739d1
parentfa1c30fe65ceca1d2b561d8e163624290c04d1bb
memory hotplug: suppress "Device memoryX does not have a release() function" warning

When calling remove_memory_block(), the function shows following message
at device_release().

"Device 'memory528' does not have a release() function, it is broken and
must be fixed."

The reason is memory_block's device struct does not have a release()
function.

So the patch registers memory_block_release() to the device's release()
function for suppressing the warning message.  Additionally, the patch
moves kfree(mem) into the release function since the release function is
prepared as a means to free a memory_block struct.

Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/base/memory.c