aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
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/x86
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/x86')
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c9
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd_64.c6
2 files changed, 7 insertions, 8 deletions
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}