kobject_uevent(&priv->kobj, KOBJ_ADD);
return error;
out_unregister:
- kobject_unregister(&priv->kobj);
+ kobject_put(&priv->kobj);
out_put_bus:
bus_put(bus);
return error;
pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name);
driver_detach(drv);
module_remove_driver(drv);
- kobject_unregister(&drv->p->kobj);
+ kobject_put(&drv->p->kobj);
bus_put(drv->bus);
}
}
mutex_unlock(&sysdev_drivers_lock);
- kobject_unregister(&sysdev->kobj);
+ kobject_put(&sysdev->kobj);
}
static void pkt_kobj_remove(struct pktcdvd_kobj *p)
{
if (p)
- kobject_unregister(&p->kobj);
+ kobject_put(&p->kobj);
}
/*
* default release function for pktcdvd kernel objects.
cpufreq_cpu_data[j] = NULL;
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
- kobject_unregister(&policy->kobj);
+ kobject_put(&policy->kobj);
wait_for_completion(&policy->kobj_unregister);
err_out_driver_exit:
unlock_policy_rwsem_write(cpu);
- kobject_unregister(&data->kobj);
-
kobject_put(&data->kobj);
/* we need to make sure that the underlying kobj is actually
static void inline cpuidle_free_state_kobj(struct cpuidle_device *device, int i)
{
- kobject_unregister(&device->kobjs[i]->kobj);
+ kobject_put(&device->kobjs[i]->kobj);
wait_for_completion(&device->kobjs[i]->kobj_unregister);
kfree(device->kobjs[i]);
device->kobjs[i] = NULL;
struct cpuidle_device *dev;
dev = per_cpu(cpuidle_devices, cpu);
- kobject_unregister(&dev->kobj);
+ kobject_put(&dev->kobj);
}
* a) module_put() this module
* b) 'kfree' the memory
*/
- kobject_unregister(&edac_dev->kobj);
+ kobject_put(&edac_dev->kobj);
}
/* edac_dev -> instance information */
/* Error unwind stack */
err_on_attrib:
- kobject_unregister(&block->kobj);
+ kobject_put(&block->kobj);
err_out:
return err;
/* 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 */
/* error unwind stack */
err_release_instance_kobj:
- kobject_unregister(&instance->kobj);
+ kobject_put(&instance->kobj);
err_out:
return err;
/* unregister this instance's kobject, SEE:
* edac_device_ctrl_instance_release() for callback operation
*/
- kobject_unregister(&instance->kobj);
+ kobject_put(&instance->kobj);
}
/*
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
*/
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;
}
}
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"
fail1:
for (i--; i >= 0; i--) {
if (csrow->nr_pages > 0) {
- kobject_unregister(&mci->csrows[i].kobj);
+ kobject_put(&mci->csrows[i].kobj);
}
}
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);
}
}
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);
}
* function release the main reference count and then
* kfree the memory
*/
- kobject_unregister(&pci->kobj);
+ kobject_put(&pci->kobj);
}
/***************************** EDAC PCI sysfs root **********************/
* 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);
}
}
static inline void
edd_device_unregister(struct edd_device *edev)
{
- kobject_unregister(&edev->kobj);
+ kobject_put(&edev->kobj);
}
static void edd_populate_dir(struct edd_device * edev)
static inline void
efivar_unregister(struct efivar_entry *var)
{
- kobject_unregister(&var->kobj);
+ kobject_put(&var->kobj);
}
kset_unregister(vars_kset);
out_firmware_unregister:
- kobject_unregister(efi_kobj);
+ kobject_put(efi_kobj);
out_free:
kfree(variable_name);
}
kset_unregister(vars_kset);
- kobject_unregister(efi_kobj);
+ kobject_put(efi_kobj);
}
module_init(efivars_init);
sysfs_remove_group(p, &pma_group);
sysfs_remove_group(p, &port->pkey_group);
sysfs_remove_group(p, &port->gid_group);
- kobject_unregister(p);
+ kobject_put(p);
}
}
sysfs_remove_group(p, &pma_group);
sysfs_remove_group(p, &port->pkey_group);
sysfs_remove_group(p, &port->gid_group);
- kobject_unregister(p);
+ kobject_put(p);
}
- kobject_unregister(device->ports_parent);
+ kobject_put(device->ports_parent);
class_device_unregister(&device->class_dev);
}
list_del(&mddev->all_mddevs);
spin_unlock(&all_mddevs_lock);
blk_cleanup_queue(mddev->queue);
- kobject_unregister(&mddev->kobj);
+ kobject_put(&mddev->kobj);
} else
spin_unlock(&all_mddevs_lock);
}
int i;
for(i = 0; i<IbmVethNumBufferPools; i++)
- kobject_unregister(&adapter->rx_buff_pool[i].kobj);
+ kobject_put(&adapter->rx_buff_pool[i].kobj);
unregister_netdev(netdev);
for (i = 0; (entry = pdcspath_entries[i]); i++) {
read_lock(&entry->rw_lock);
if (entry->ready >= 2)
- kobject_unregister(&entry->kobj);
+ kobject_put(&entry->kobj);
read_unlock(&entry->rw_lock);
}
}
kset_unregister(paths_kset);
fail_ksetreg:
- kobject_unregister(stable_kobj);
+ kobject_put(stable_kobj);
fail_firmreg:
printk(KERN_INFO PDCS_PREFIX " bailing out\n");
{
pdcs_unregister_pathentries();
kset_unregister(paths_kset);
- kobject_unregister(stable_kobj);
+ kobject_put(stable_kobj);
}
fs_remove_slot (slot);
dbg ("Removed slot %s from the list\n", slot->name);
- kobject_unregister(&slot->kobj);
+ kobject_put(&slot->kobj);
return 0;
}
error = sysfs_create_group(dlpar_kobj, &dlpar_attr_group);
if (error)
- kobject_unregister(dlpar_kobj);
+ kobject_put(dlpar_kobj);
return error;
}
void dlpar_sysfs_exit(void)
{
sysfs_remove_group(dlpar_kobj, &dlpar_attr_group);
- kobject_unregister(dlpar_kobj);
+ kobject_put(dlpar_kobj);
}
for (mi--; mi>=0; mi--) {
mem = &idev->info->mem[mi];
map = mem->map;
- kobject_unregister(&map->kobj);
+ kobject_put(&map->kobj);
}
- kobject_unregister(idev->map_dir);
+ kobject_put(idev->map_dir);
sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp);
err_group:
dev_err(idev->dev, "error creating sysfs files (%d)\n", ret);
mem = &idev->info->mem[mi];
if (mem->size == 0)
break;
- kobject_unregister(&mem->map->kobj);
+ kobject_put(&mem->map->kobj);
}
- kobject_unregister(idev->map_dir);
+ kobject_put(idev->map_dir);
sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp);
}