summaryrefslogtreecommitdiff
path: root/drivers/edac/edac_mc_sysfs.c
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2015-11-27 11:40:43 +0100
committerBorislav Petkov <bp@suse.de>2015-12-11 16:56:39 +0100
commit733476cf207faf574b132523ff2aee78b488ed6b (patch)
treef0d455a00d75370ae2bfef8572ade0c73e748f9c /drivers/edac/edac_mc_sysfs.c
parentfcd5c4dd8201595d4c598c9cca5e54760277d687 (diff)
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_mc_sysfs.c')
-rw-r--r--drivers/edac/edac_mc_sysfs.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index 58aed67b7eba..1c79ae3e083a 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -1039,7 +1039,7 @@ int __init edac_mc_sysfs_init(void)
mci_pdev = kzalloc(sizeof(*mci_pdev), GFP_KERNEL);
if (!mci_pdev) {
err = -ENOMEM;
- goto out_put_sysfs;
+ goto out;
}
mci_pdev->bus = edac_subsys;
@@ -1057,8 +1057,6 @@ int __init edac_mc_sysfs_init(void)
out_dev_free:
kfree(mci_pdev);
- out_put_sysfs:
- edac_put_sysfs_subsys();
out:
return err;
}
@@ -1066,5 +1064,4 @@ int __init edac_mc_sysfs_init(void)
void edac_mc_sysfs_exit(void)
{
device_unregister(mci_pdev);
- edac_put_sysfs_subsys();
}