eq->ops = &e->ops;
eq->elevator_type = e;
- kobject_init_ng(&eq->kobj, &elv_ktype);
+ kobject_init(&eq->kobj, &elv_ktype);
mutex_init(&eq->sysfs_lock);
eq->hash = kmalloc_node(sizeof(struct hlist_head) * ELV_HASH_ENTRIES,
init_timer(&q->unplug_timer);
- kobject_init_ng(&q->kobj, &queue_ktype);
+ kobject_init(&q->kobj, &queue_ktype);
mutex_init(&q->sysfs_lock);
void class_device_initialize(struct class_device *class_dev)
{
class_dev->kobj.kset = &class_obj_subsys;
- kobject_init_ng(&class_dev->kobj, &class_device_ktype);
+ kobject_init(&class_dev->kobj, &class_device_ktype);
INIT_LIST_HEAD(&class_dev->node);
}
void device_initialize(struct device *dev)
{
dev->kobj.kset = devices_kset;
- kobject_init_ng(&dev->kobj, &device_ktype);
+ kobject_init(&dev->kobj, &device_ktype);
klist_init(&dev->klist_children, klist_children_get,
klist_children_put);
INIT_LIST_HEAD(&dev->dma_pools);
if (err)
goto abort_free;
- kobject_init_ng(&rdev->kobj, &rdev_ktype);
+ kobject_init(&rdev->kobj, &rdev_ktype);
rdev->desc_nr = -1;
rdev->saved_raid_disk = -1;
/* This gets us 1 reference, which is held on behalf of the driver
* infrastructure. It's released at module unload. */
- kobject_init_ng(&cnx->kobject, &veth_lpar_connection_ktype);
+ kobject_init(&cnx->kobject, &veth_lpar_connection_ktype);
msgs = kcalloc(VETH_NUMBUFFERS, sizeof(struct veth_msg), GFP_KERNEL);
if (! msgs) {
return NULL;
}
- kobject_init_ng(&port->kobject, &veth_port_ktype);
+ kobject_init(&port->kobject, &veth_port_ktype);
if (0 != kobject_add(&port->kobject, &dev->dev.kobj, "veth_port"))
veth_error("Failed adding port for %s to sysfs.\n", dev->name);
map = kzalloc(sizeof(*map), GFP_KERNEL);
if (!map)
goto err;
- kobject_init_ng(&map->kobj, &map_attr_type);
+ kobject_init(&map->kobj, &map_attr_type);
map->mem = mem;
mem->map = map;
ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi);
struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL);
if (p) {
INIT_LIST_HEAD(&p->list);
- kobject_init_ng(&p->kobj, &ktype_cdev_dynamic);
+ kobject_init(&p->kobj, &ktype_cdev_dynamic);
}
return p;
}
{
memset(cdev, 0, sizeof *cdev);
INIT_LIST_HEAD(&cdev->list);
- kobject_init_ng(&cdev->kobj, &ktype_cdev_default);
+ kobject_init(&cdev->kobj, &ktype_cdev_default);
cdev->ops = fops;
}
return kobj->k_name;
}
-extern void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype);
+extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
extern int __must_check kobject_add(struct kobject *kobj,
struct kobject *parent,
const char *fmt, ...);
EXPORT_SYMBOL(kobject_set_name);
/**
- * kobject_init_ng - initialize a kobject structure
+ * kobject_init - initialize a kobject structure
* @kobj: pointer to the kobject to initialize
* @ktype: pointer to the ktype for this kobject.
*
* to kobject_put(), not by a call to kfree directly to ensure that all of
* the memory is cleaned up properly.
*/
-void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype)
+void kobject_init(struct kobject *kobj, struct kobj_type *ktype)
{
char *err_str;
printk(KERN_ERR "kobject: %s\n", err_str);
dump_stack();
}
-EXPORT_SYMBOL(kobject_init_ng);
+EXPORT_SYMBOL(kobject_init);
static int kobject_add_varg(struct kobject *kobj, struct kobject *parent,
const char *fmt, va_list vargs)
* @parent: pointer to the parent of this kobject.
* @fmt: the name of the kobject.
*
- * This function combines the call to kobject_init_ng() and
+ * This function combines the call to kobject_init() and
* kobject_add(). The same type of error handling after a call to
* kobject_add() and kobject lifetime rules are the same here.
*/
va_list args;
int retval;
- kobject_init_ng(kobj, ktype);
+ kobject_init(kobj, ktype);
va_start(args, fmt);
retval = kobject_add_varg(kobj, parent, fmt, args);
*
* If the kobject was not able to be created, NULL will be returned.
* The kobject structure returned from here must be cleaned up with a
- * call to kobject_put() and not kfree(), as kobject_init_ng() has
+ * call to kobject_put() and not kfree(), as kobject_init() has
* already been called on this structure.
*/
struct kobject *kobject_create(void)
if (!kobj)
return NULL;
- kobject_init_ng(kobj, &dynamic_kobj_ktype);
+ kobject_init(kobj, &dynamic_kobj_ktype);
return kobj;
}