summaryrefslogtreecommitdiff
path: root/drivers/edac/edac_device_sysfs.c
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2015-11-27 10:40:43 (GMT)
committerBorislav Petkov <bp@suse.de>2015-12-11 15:56:39 (GMT)
commit733476cf207faf574b132523ff2aee78b488ed6b (patch)
treef0d455a00d75370ae2bfef8572ade0c73e748f9c /drivers/edac/edac_device_sysfs.c
parentfcd5c4dd8201595d4c598c9cca5e54760277d687 (diff)
downloadlinux-733476cf207faf574b132523ff2aee78b488ed6b.tar.xz
EDAC: Rip out the edac_subsys reference counting
This was really dumb - reference counting for the main EDAC sysfs object. While we could've simply registered it as the first thing in the module init path and then hand it around to what needs it. Do that and rip out all the code around it, thus simplifying the whole handling significantly. Move the edac_subsys node back to edac_module.c. Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/edac_device_sysfs.c')
-rw-r--r--drivers/edac/edac_device_sysfs.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/edac/edac_device_sysfs.c b/drivers/edac/edac_device_sysfs.c
index fb68a06..1705271 100644
--- a/drivers/edac/edac_device_sysfs.c
+++ b/drivers/edac/edac_device_sysfs.c
@@ -256,7 +256,7 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)
if (!try_module_get(edac_dev->owner)) {
err = -ENODEV;
- goto err_mod_get;
+ goto err_out;
}
/* register */
@@ -282,9 +282,6 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)
err_kobj_reg:
module_put(edac_dev->owner);
-err_mod_get:
- edac_put_sysfs_subsys();
-
err_out:
return err;
}
@@ -306,7 +303,6 @@ void edac_device_unregister_sysfs_main_kobj(struct edac_device_ctl_info *dev)
* b) 'kfree' the memory
*/
kobject_put(&dev->kobj);
- edac_put_sysfs_subsys();
}
/* edac_dev -> instance information */