diff options
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/edac_device_sysfs.c | 10 | ||||
-rw-r--r-- | drivers/edac/edac_mc_sysfs.c | 12 | ||||
-rw-r--r-- | drivers/edac/edac_pci_sysfs.c | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/drivers/edac/edac_device_sysfs.c b/drivers/edac/edac_device_sysfs.c index 10e5b19a3e3b..53764577035f 100644 --- a/drivers/edac/edac_device_sysfs.c +++ b/drivers/edac/edac_device_sysfs.c | |||
@@ -303,7 +303,7 @@ void edac_device_unregister_sysfs_main_kobj( | |||
303 | * a) module_put() this module | 303 | * a) module_put() this module |
304 | * b) 'kfree' the memory | 304 | * b) 'kfree' the memory |
305 | */ | 305 | */ |
306 | kobject_unregister(&edac_dev->kobj); | 306 | kobject_put(&edac_dev->kobj); |
307 | } | 307 | } |
308 | 308 | ||
309 | /* edac_dev -> instance information */ | 309 | /* edac_dev -> instance information */ |
@@ -574,7 +574,7 @@ static int edac_device_create_block(struct edac_device_ctl_info *edac_dev, | |||
574 | 574 | ||
575 | /* Error unwind stack */ | 575 | /* Error unwind stack */ |
576 | err_on_attrib: | 576 | err_on_attrib: |
577 | kobject_unregister(&block->kobj); | 577 | kobject_put(&block->kobj); |
578 | 578 | ||
579 | err_out: | 579 | err_out: |
580 | return err; | 580 | return err; |
@@ -605,7 +605,7 @@ static void edac_device_delete_block(struct edac_device_ctl_info *edac_dev, | |||
605 | /* unregister this block's kobject, SEE: | 605 | /* unregister this block's kobject, SEE: |
606 | * edac_device_ctrl_block_release() callback operation | 606 | * edac_device_ctrl_block_release() callback operation |
607 | */ | 607 | */ |
608 | kobject_unregister(&block->kobj); | 608 | kobject_put(&block->kobj); |
609 | } | 609 | } |
610 | 610 | ||
611 | /* instance ctor/dtor code */ | 611 | /* instance ctor/dtor code */ |
@@ -672,7 +672,7 @@ static int edac_device_create_instance(struct edac_device_ctl_info *edac_dev, | |||
672 | 672 | ||
673 | /* error unwind stack */ | 673 | /* error unwind stack */ |
674 | err_release_instance_kobj: | 674 | err_release_instance_kobj: |
675 | kobject_unregister(&instance->kobj); | 675 | kobject_put(&instance->kobj); |
676 | 676 | ||
677 | err_out: | 677 | err_out: |
678 | return err; | 678 | return err; |
@@ -697,7 +697,7 @@ static void edac_device_delete_instance(struct edac_device_ctl_info *edac_dev, | |||
697 | /* unregister this instance's kobject, SEE: | 697 | /* unregister this instance's kobject, SEE: |
698 | * edac_device_ctrl_instance_release() for callback operation | 698 | * edac_device_ctrl_instance_release() for callback operation |
699 | */ | 699 | */ |
700 | kobject_unregister(&instance->kobj); | 700 | kobject_put(&instance->kobj); |
701 | } | 701 | } |
702 | 702 | ||
703 | /* | 703 | /* |
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 45b1d3633418..9aac88027fb3 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c | |||
@@ -395,7 +395,7 @@ static int edac_create_csrow_object(struct mem_ctl_info *mci, | |||
395 | goto err_release_top_kobj; | 395 | goto err_release_top_kobj; |
396 | 396 | ||
397 | /* At this point, to release a csrow kobj, one must | 397 | /* At this point, to release a csrow kobj, one must |
398 | * call the kobject_unregister and allow that tear down | 398 | * call the kobject_put and allow that tear down |
399 | * to work the releasing | 399 | * to work the releasing |
400 | */ | 400 | */ |
401 | 401 | ||
@@ -406,7 +406,7 @@ static int edac_create_csrow_object(struct mem_ctl_info *mci, | |||
406 | err = edac_create_channel_files(&csrow->kobj, chan); | 406 | err = edac_create_channel_files(&csrow->kobj, chan); |
407 | if (err) { | 407 | if (err) { |
408 | /* special case the unregister here */ | 408 | /* special case the unregister here */ |
409 | kobject_unregister(&csrow->kobj); | 409 | kobject_put(&csrow->kobj); |
410 | goto err_out; | 410 | goto err_out; |
411 | } | 411 | } |
412 | } | 412 | } |
@@ -808,7 +808,7 @@ fail_out: | |||
808 | void edac_mc_unregister_sysfs_main_kobj(struct mem_ctl_info *mci) | 808 | void edac_mc_unregister_sysfs_main_kobj(struct mem_ctl_info *mci) |
809 | { | 809 | { |
810 | /* delete the kobj from the mc_kset */ | 810 | /* delete the kobj from the mc_kset */ |
811 | kobject_unregister(&mci->edac_mci_kobj); | 811 | kobject_put(&mci->edac_mci_kobj); |
812 | } | 812 | } |
813 | 813 | ||
814 | #define EDAC_DEVICE_SYMLINK "device" | 814 | #define EDAC_DEVICE_SYMLINK "device" |
@@ -923,7 +923,7 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) | |||
923 | fail1: | 923 | fail1: |
924 | for (i--; i >= 0; i--) { | 924 | for (i--; i >= 0; i--) { |
925 | if (csrow->nr_pages > 0) { | 925 | if (csrow->nr_pages > 0) { |
926 | kobject_unregister(&mci->csrows[i].kobj); | 926 | kobject_put(&mci->csrows[i].kobj); |
927 | } | 927 | } |
928 | } | 928 | } |
929 | 929 | ||
@@ -950,7 +950,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) | |||
950 | for (i = 0; i < mci->nr_csrows; i++) { | 950 | for (i = 0; i < mci->nr_csrows; i++) { |
951 | if (mci->csrows[i].nr_pages > 0) { | 951 | if (mci->csrows[i].nr_pages > 0) { |
952 | debugf0("%s() unreg csrow-%d\n", __func__, i); | 952 | debugf0("%s() unreg csrow-%d\n", __func__, i); |
953 | kobject_unregister(&mci->csrows[i].kobj); | 953 | kobject_put(&mci->csrows[i].kobj); |
954 | } | 954 | } |
955 | } | 955 | } |
956 | 956 | ||
@@ -967,7 +967,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) | |||
967 | debugf0("%s() unregister this mci kobj\n", __func__); | 967 | debugf0("%s() unregister this mci kobj\n", __func__); |
968 | 968 | ||
969 | /* unregister this instance's kobject */ | 969 | /* unregister this instance's kobject */ |
970 | kobject_unregister(&mci->edac_mci_kobj); | 970 | kobject_put(&mci->edac_mci_kobj); |
971 | } | 971 | } |
972 | 972 | ||
973 | 973 | ||
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c index 834eaa9d6148..5b075da99145 100644 --- a/drivers/edac/edac_pci_sysfs.c +++ b/drivers/edac/edac_pci_sysfs.c | |||
@@ -205,7 +205,7 @@ void edac_pci_unregister_sysfs_instance_kobj(struct edac_pci_ctl_info *pci) | |||
205 | * function release the main reference count and then | 205 | * function release the main reference count and then |
206 | * kfree the memory | 206 | * kfree the memory |
207 | */ | 207 | */ |
208 | kobject_unregister(&pci->kobj); | 208 | kobject_put(&pci->kobj); |
209 | } | 209 | } |
210 | 210 | ||
211 | /***************************** EDAC PCI sysfs root **********************/ | 211 | /***************************** EDAC PCI sysfs root **********************/ |
@@ -411,9 +411,9 @@ static void edac_pci_main_kobj_teardown(void) | |||
411 | * main kobj | 411 | * main kobj |
412 | */ | 412 | */ |
413 | if (atomic_dec_return(&edac_pci_sysfs_refcount) == 0) { | 413 | if (atomic_dec_return(&edac_pci_sysfs_refcount) == 0) { |
414 | debugf0("%s() called kobject_unregister on main kobj\n", | 414 | debugf0("%s() called kobject_put on main kobj\n", |
415 | __func__); | 415 | __func__); |
416 | kobject_unregister(&edac_pci_top_main_kobj); | 416 | kobject_put(&edac_pci_top_main_kobj); |
417 | } | 417 | } |
418 | } | 418 | } |
419 | 419 | ||