]> 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>
Fri, 9 Nov 2012 03:03:59 +0000 (14:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 12 Nov 2012 04:16:54 +0000 (15:16 +1100)
commitd81073f0f84e0480b60525966f1b2b1e9330258d
treebc38b0787196583f7769d497c55af3f9d4a05e80
parent9a6db184f2b217459f85bcd678d511c70f20fcbe
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