summaryrefslogtreecommitdiff
path: root/drivers/edac
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-12-20 08:13:05 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 20:40:40 -0800
commitc10997f6575f476ff38442fa18fd4a0d80345f9d (patch)
tree9b2bb7e647bd39fb80f23d7a6b34bf2587d660a7 /drivers/edac
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')
-rw-r--r--drivers/edac/edac_device_sysfs.c10
-rw-r--r--drivers/edac/edac_mc_sysfs.c12
-rw-r--r--drivers/edac/edac_pci_sysfs.c6
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(
* a) module_put() this module
* b) 'kfree' the memory
*/
- kobject_unregister(&edac_dev->kobj);
+ kobject_put(&edac_dev->kobj);
}
/* edac_dev -> instance information */
@@ -574,7 +574,7 @@ static int edac_device_create_block(struct edac_device_ctl_info *edac_dev,
/* Error unwind stack */
err_on_attrib:
- kobject_unregister(&block->kobj);
+ kobject_put(&block->kobj);
err_out:
return err;
@@ -605,7 +605,7 @@ static void edac_device_delete_block(struct edac_device_ctl_info *edac_dev,
/* unregister this block's kobject, SEE:
* edac_device_ctrl_block_release() callback operation
*/
- kobject_unregister(&block->kobj);
+ kobject_put(&block->kobj);
}
/* instance ctor/dtor code */
@@ -672,7 +672,7 @@ static int edac_device_create_instance(struct edac_device_ctl_info *edac_dev,
/* error unwind stack */
err_release_instance_kobj:
- kobject_unregister(&instance->kobj);
+ kobject_put(&instance->kobj);
err_out:
return err;
@@ -697,7 +697,7 @@ static void edac_device_delete_instance(struct edac_device_ctl_info *edac_dev,
/* unregister this instance's kobject, SEE:
* edac_device_ctrl_instance_release() for callback operation
*/
- kobject_unregister(&instance->kobj);
+ kobject_put(&instance->kobj);
}
/*
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,
goto err_release_top_kobj;
/* At this point, to release a csrow kobj, one must
- * call the kobject_unregister and allow that tear down
+ * call the kobject_put and allow that tear down
* to work the releasing
*/
@@ -406,7 +406,7 @@ static int edac_create_csrow_object(struct mem_ctl_info *mci,
err = edac_create_channel_files(&csrow->kobj, chan);
if (err) {
/* special case the unregister here */
- kobject_unregister(&csrow->kobj);
+ kobject_put(&csrow->kobj);
goto err_out;
}
}
@@ -808,7 +808,7 @@ fail_out:
void edac_mc_unregister_sysfs_main_kobj(struct mem_ctl_info *mci)
{
/* delete the kobj from the mc_kset */
- kobject_unregister(&mci->edac_mci_kobj);
+ kobject_put(&mci->edac_mci_kobj);
}
#define EDAC_DEVICE_SYMLINK "device"
@@ -923,7 +923,7 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
fail1:
for (i--; i >= 0; i--) {
if (csrow->nr_pages > 0) {
- kobject_unregister(&mci->csrows[i].kobj);
+ kobject_put(&mci->csrows[i].kobj);
}
}
@@ -950,7 +950,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
for (i = 0; i < mci->nr_csrows; i++) {
if (mci->csrows[i].nr_pages > 0) {
debugf0("%s() unreg csrow-%d\n", __func__, i);
- kobject_unregister(&mci->csrows[i].kobj);
+ kobject_put(&mci->csrows[i].kobj);
}
}
@@ -967,7 +967,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
debugf0("%s() unregister this mci kobj\n", __func__);
/* unregister this instance's kobject */
- kobject_unregister(&mci->edac_mci_kobj);
+ kobject_put(&mci->edac_mci_kobj);
}
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)
* function release the main reference count and then
* kfree the memory
*/
- kobject_unregister(&pci->kobj);
+ kobject_put(&pci->kobj);
}
/***************************** EDAC PCI sysfs root **********************/
@@ -411,9 +411,9 @@ static void edac_pci_main_kobj_teardown(void)
* main kobj
*/
if (atomic_dec_return(&edac_pci_sysfs_refcount) == 0) {
- debugf0("%s() called kobject_unregister on main kobj\n",
+ debugf0("%s() called kobject_put on main kobj\n",
__func__);
- kobject_unregister(&edac_pci_top_main_kobj);
+ kobject_put(&edac_pci_top_main_kobj);
}
}