summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2007-12-20 17:13:05 +0100
committerGreg Kroah-Hartman2008-01-25 05:40:40 +0100
commit78a2d906b40fe530ea800c1e873bfe8f02326f1e (patch)
treeebeef35150816fa807f71e596a9aaf711ad10a90 /kernel
parentKobject: convert fs/* from kobject_unregister() to kobject_put() (diff)
downloadkernel-qcow2-linux-78a2d906b40fe530ea800c1e873bfe8f02326f1e.tar.gz
kernel-qcow2-linux-78a2d906b40fe530ea800c1e873bfe8f02326f1e.tar.xz
kernel-qcow2-linux-78a2d906b40fe530ea800c1e873bfe8f02326f1e.zip
Kobject: convert remaining 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 'kernel')
-rw-r--r--kernel/ksysfs.c2
-rw-r--r--kernel/module.c9
2 files changed, 5 insertions, 6 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index 1081aff5fb9e..e53bc30e9ba5 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -154,7 +154,7 @@ notes_exit:
group_exit:
sysfs_remove_group(kernel_kobj, &kernel_attr_group);
kset_exit:
- kobject_unregister(kernel_kobj);
+ kobject_put(kernel_kobj);
exit:
return error;
}
diff --git a/kernel/module.c b/kernel/module.c
index 89cd4c7361d8..dcb8a2cbf75e 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1257,9 +1257,8 @@ int mod_sysfs_setup(struct module *mod,
out_unreg_param:
module_param_sysfs_remove(mod);
out_unreg_holders:
- kobject_unregister(mod->holders_dir);
+ kobject_put(mod->holders_dir);
out_unreg:
- kobject_del(&mod->mkobj.kobj);
kobject_put(&mod->mkobj.kobj);
return err;
}
@@ -1269,9 +1268,9 @@ static void mod_kobject_remove(struct module *mod)
{
module_remove_modinfo_attrs(mod);
module_param_sysfs_remove(mod);
- kobject_unregister(mod->mkobj.drivers_dir);
- kobject_unregister(mod->holders_dir);
- kobject_unregister(&mod->mkobj.kobj);
+ kobject_put(mod->mkobj.drivers_dir);
+ kobject_put(mod->holders_dir);
+ kobject_put(&mod->mkobj.kobj);
}
/*