aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc_sysfs.c
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:40 -0500
commitc10997f6575f476ff38442fa18fd4a0d80345f9d (patch)
tree9b2bb7e647bd39fb80f23d7a6b34bf2587d660a7 /drivers/edac/edac_mc_sysfs.c
parent38a382ae5dd4f4d04e3046816b0a41836094e538 (diff)
Kobject: convert drivers/* 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 'drivers/edac/edac_mc_sysfs.c')
-rw-r--r--drivers/edac/edac_mc_sysfs.c12
1 files changed, 6 insertions, 6 deletions
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:
808void edac_mc_unregister_sysfs_main_kobj(struct mem_ctl_info *mci) 808void 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)
923fail1: 923fail1:
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