Kobject: convert arch/* from kobject_unregister() to kobject_put()

There is no need for kobject_unregister() anymore, thanks to Kay's
kobject cleanup changes, so replace all instances of it with
kobject_put().


Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Greg Kroah-Hartman
2007-12-20 08:13:05 -08:00
parent 7a6a41615b
commit 38a382ae5d
5 changed files with 14 additions and 16 deletions

View File

@ -366,10 +366,9 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
"index%1lu", i);
if (unlikely(retval)) {
for (j = 0; j < i; j++) {
kobject_unregister(
&(LEAF_KOBJECT_PTR(cpu,j)->kobj));
kobject_put(&(LEAF_KOBJECT_PTR(cpu,j)->kobj));
}
kobject_unregister(&all_cpu_cache_info[cpu].kobj);
kobject_put(&all_cpu_cache_info[cpu].kobj);
cpu_cache_sysfs_exit(cpu);
break;
}
@ -386,10 +385,10 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev)
unsigned long i;
for (i = 0; i < all_cpu_cache_info[cpu].num_cache_leaves; i++)
kobject_unregister(&(LEAF_KOBJECT_PTR(cpu,i)->kobj));
kobject_put(&(LEAF_KOBJECT_PTR(cpu,i)->kobj));
if (all_cpu_cache_info[cpu].kobj.parent) {
kobject_unregister(&all_cpu_cache_info[cpu].kobj);
kobject_put(&all_cpu_cache_info[cpu].kobj);
memset(&all_cpu_cache_info[cpu].kobj,
0,
sizeof(struct kobject));