]> err.no Git - linux-2.6/commit
driver core: register_memory/unregister_memory clean ups and bugfix
authorBadari Pulavarty <pbadari@us.ibm.com>
Mon, 11 Feb 2008 17:23:18 +0000 (09:23 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 20 Apr 2008 02:10:19 +0000 (19:10 -0700)
commit00a41db522c77af33ea5ee9837d4f043ce150249
tree97e145d00adadcaf00f7d0997b7089c8a7d53894
parentda19cbcf71cde3c09587b5924d113f0c7f1fd23a
driver core: register_memory/unregister_memory clean ups and bugfix

register_memory()/unregister_memory() never gets called with
"root". unregister_memory() is accessing kobject_name of
the object just freed up. Since no one uses the code,
lets take the code out. And also, make register_memory() static.

Another bug fix - before calling unregister_memory()
remove_memory_block() gets a ref on kobject. unregister_memory()
need to drop that ref before calling sysdev_unregister().

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/memory.c