From: Yasuaki Ishimatsu Date: Wed, 12 Dec 2012 00:00:57 +0000 (-0800) Subject: memory-hotplug: suppress "Device nodeX does not have a release() function" warning X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~81^2~55 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c7b5b4ed948d1ddf9672ee932a16750b280822a;p=pandora-kernel.git memory-hotplug: suppress "Device nodeX does not have a release() function" warning When calling unregister_node(), the function shows following message at device_release(). "Device 'node2' does not have a release() function, it is broken and must be fixed." The reason is node's device struct does not have a release() function. So the patch registers node_device_release() to the device's release() function for suppressing the warning message. Additionally, the patch adds memset() to initialize a node struct into register_node(). Because the node struct is part of node_devices[] array and it cannot be freed by node_device_release(). So if system reuses the node struct, it has a garbage. Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang Cc: David Rientjes Cc: Jiang Liu Cc: Minchan Kim Cc: KOSAKI Motohiro Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed