aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-12-20 11:13:05 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:39 -0500
commit38a382ae5dd4f4d04e3046816b0a41836094e538 (patch)
tree9413139d10b195a8424127ea2467459fdccf3d05 /arch
parent7a6a41615bfb2f03ce797bc24104c50b42c935e5 (diff)
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/topology.c9
-rw-r--r--arch/s390/hypfs/inode.c4
-rw-r--r--arch/sh/kernel/cpu/sh4/sq.c2
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c9
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd_64.c6
5 files changed, 14 insertions, 16 deletions
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index c4311e3adf55..a2484fc1a06c 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -366,10 +366,9 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
366 "index%1lu", i); 366 "index%1lu", i);
367 if (unlikely(retval)) { 367 if (unlikely(retval)) {
368 for (j = 0; j < i; j++) { 368 for (j = 0; j < i; j++) {
369 kobject_unregister( 369 kobject_put(&(LEAF_KOBJECT_PTR(cpu,j)->kobj));
370 &(LEAF_KOBJECT_PTR(cpu,j)->kobj));
371 } 370 }
372 kobject_unregister(&all_cpu_cache_info[cpu].kobj); 371 kobject_put(&all_cpu_cache_info[cpu].kobj);
373 cpu_cache_sysfs_exit(cpu); 372 cpu_cache_sysfs_exit(cpu);
374 break; 373 break;
375 } 374 }
@@ -386,10 +385,10 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev)
386 unsigned long i; 385 unsigned long i;
387 386
388 for (i = 0; i < all_cpu_cache_info[cpu].num_cache_leaves; i++) 387 for (i = 0; i < all_cpu_cache_info[cpu].num_cache_leaves; i++)
389 kobject_unregister(&(LEAF_KOBJECT_PTR(cpu,i)->kobj)); 388 kobject_put(&(LEAF_KOBJECT_PTR(cpu,i)->kobj));
390 389
391 if (all_cpu_cache_info[cpu].kobj.parent) { 390 if (all_cpu_cache_info[cpu].kobj.parent) {
392 kobject_unregister(&all_cpu_cache_info[cpu].kobj); 391 kobject_put(&all_cpu_cache_info[cpu].kobj);
393 memset(&all_cpu_cache_info[cpu].kobj, 392 memset(&all_cpu_cache_info[cpu].kobj,
394 0, 393 0,
395 sizeof(struct kobject)); 394 sizeof(struct kobject));
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 631a6109f642..4b010ff814c9 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -517,7 +517,7 @@ static int __init hypfs_init(void)
517 return 0; 517 return 0;
518 518
519fail_filesystem: 519fail_filesystem:
520 kobject_unregister(s390_kobj); 520 kobject_put(s390_kobj);
521fail_sysfs: 521fail_sysfs:
522 if (!MACHINE_IS_VM) 522 if (!MACHINE_IS_VM)
523 hypfs_diag_exit(); 523 hypfs_diag_exit();
@@ -531,7 +531,7 @@ static void __exit hypfs_exit(void)
531 if (!MACHINE_IS_VM) 531 if (!MACHINE_IS_VM)
532 hypfs_diag_exit(); 532 hypfs_diag_exit();
533 unregister_filesystem(&hypfs_type); 533 unregister_filesystem(&hypfs_type);
534 kobject_unregister(s390_kobj); 534 kobject_put(s390_kobj);
535} 535}
536 536
537module_init(hypfs_init) 537module_init(hypfs_init)
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c
index 97fd9b9a4820..3008c00eea6b 100644
--- a/arch/sh/kernel/cpu/sh4/sq.c
+++ b/arch/sh/kernel/cpu/sh4/sq.c
@@ -360,7 +360,7 @@ static int __devexit sq_sysdev_remove(struct sys_device *sysdev)
360 unsigned int cpu = sysdev->id; 360 unsigned int cpu = sysdev->id;
361 struct kobject *kobj = sq_kobject[cpu]; 361 struct kobject *kobj = sq_kobject[cpu];
362 362
363 kobject_unregister(kobj); 363 kobject_put(kobj);
364 return 0; 364 return 0;
365} 365}
366 366
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 3509542eed87..8b4507b8469b 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -749,10 +749,9 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
749 "index%1lu", i); 749 "index%1lu", i);
750 if (unlikely(retval)) { 750 if (unlikely(retval)) {
751 for (j = 0; j < i; j++) { 751 for (j = 0; j < i; j++) {
752 kobject_unregister( 752 kobject_put(&(INDEX_KOBJECT_PTR(cpu,j)->kobj));
753 &(INDEX_KOBJECT_PTR(cpu,j)->kobj));
754 } 753 }
755 kobject_unregister(cache_kobject[cpu]); 754 kobject_put(cache_kobject[cpu]);
756 cpuid4_cache_sysfs_exit(cpu); 755 cpuid4_cache_sysfs_exit(cpu);
757 break; 756 break;
758 } 757 }
@@ -777,8 +776,8 @@ static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
777 cpu_clear(cpu, cache_dev_map); 776 cpu_clear(cpu, cache_dev_map);
778 777
779 for (i = 0; i < num_cache_leaves; i++) 778 for (i = 0; i < num_cache_leaves; i++)
780 kobject_unregister(&(INDEX_KOBJECT_PTR(cpu,i)->kobj)); 779 kobject_put(&(INDEX_KOBJECT_PTR(cpu,i)->kobj));
781 kobject_unregister(cache_kobject[cpu]); 780 kobject_put(cache_kobject[cpu]);
782 cpuid4_cache_sysfs_exit(cpu); 781 cpuid4_cache_sysfs_exit(cpu);
783} 782}
784 783
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
index ef15f35b10ed..753588755fee 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
@@ -456,7 +456,7 @@ recurse:
456 456
457out_free: 457out_free:
458 if (b) { 458 if (b) {
459 kobject_unregister(&b->kobj); 459 kobject_put(&b->kobj);
460 kfree(b); 460 kfree(b);
461 } 461 }
462 return err; 462 return err;
@@ -581,7 +581,7 @@ static void deallocate_threshold_block(unsigned int cpu,
581 return; 581 return;
582 582
583 list_for_each_entry_safe(pos, tmp, &head->blocks->miscj, miscj) { 583 list_for_each_entry_safe(pos, tmp, &head->blocks->miscj, miscj) {
584 kobject_unregister(&pos->kobj); 584 kobject_put(&pos->kobj);
585 list_del(&pos->miscj); 585 list_del(&pos->miscj);
586 kfree(pos); 586 kfree(pos);
587 } 587 }
@@ -627,7 +627,7 @@ static void threshold_remove_bank(unsigned int cpu, int bank)
627 deallocate_threshold_block(cpu, bank); 627 deallocate_threshold_block(cpu, bank);
628 628
629free_out: 629free_out:
630 kobject_unregister(b->kobj); 630 kobject_put(b->kobj);
631 kfree(b); 631 kfree(b);
632 per_cpu(threshold_banks, cpu)[bank] = NULL; 632 per_cpu(threshold_banks, cpu)[bank] = NULL;
633} 633}