group_exit:
sysfs_remove_group(kernel_kobj, &kernel_attr_group);
kset_exit:
- kobject_unregister(kernel_kobj);
+ kobject_put(kernel_kobj);
exit:
return error;
}
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;
}
{
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);
}
/*
*
* This function creates a kset structure dynamically and registers it
* with sysfs. When you are finished with this structure, call
- * kobject_unregister() and the structure will be dynamically freed when
+ * kobject_put() and the structure will be dynamically freed when
* it is no longer being used.
*
* If the kobject was not able to be created, NULL will be returned.
{
if (!k)
return;
- kobject_unregister(&k->kobj);
+ kobject_put(&k->kobj);
}
struct kobject *kobj = &dev->dev.kobj;
struct net_bridge *br = netdev_priv(dev);
- kobject_unregister(br->ifobj);
+ kobject_put(br->ifobj);
sysfs_remove_bin_file(kobj, &bridge_forward);
sysfs_remove_group(kobj, &bridge_group);
}
retval = register_filesystem(&fs_type);
if (retval)
- kobject_unregister(security_kobj);
+ kobject_put(security_kobj);
return retval;
}