Commit f9cb074bff8e762ef24c44678a5a7d907f82fbeb

Authored by Greg Kroah-Hartman
1 parent e1543ddf73

Kobject: rename kobject_init_ng() to kobject_init()

Now that the old kobject_init() function is gone, rename
kobject_init_ng() to kobject_init() to clean up the namespace.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 10 changed files with 18 additions and 18 deletions Side-by-side Diff

... ... @@ -185,7 +185,7 @@
185 185  
186 186 eq->ops = &e->ops;
187 187 eq->elevator_type = e;
188   - kobject_init_ng(&eq->kobj, &elv_ktype);
  188 + kobject_init(&eq->kobj, &elv_ktype);
189 189 mutex_init(&eq->sysfs_lock);
190 190  
191 191 eq->hash = kmalloc_node(sizeof(struct hlist_head) * ELV_HASH_ENTRIES,
... ... @@ -1862,7 +1862,7 @@
1862 1862  
1863 1863 init_timer(&q->unplug_timer);
1864 1864  
1865   - kobject_init_ng(&q->kobj, &queue_ktype);
  1865 + kobject_init(&q->kobj, &queue_ktype);
1866 1866  
1867 1867 mutex_init(&q->sysfs_lock);
1868 1868  
drivers/base/class.c
... ... @@ -553,7 +553,7 @@
553 553 void class_device_initialize(struct class_device *class_dev)
554 554 {
555 555 class_dev->kobj.kset = &class_obj_subsys;
556   - kobject_init_ng(&class_dev->kobj, &class_device_ktype);
  556 + kobject_init(&class_dev->kobj, &class_device_ktype);
557 557 INIT_LIST_HEAD(&class_dev->node);
558 558 }
559 559  
... ... @@ -525,7 +525,7 @@
525 525 void device_initialize(struct device *dev)
526 526 {
527 527 dev->kobj.kset = devices_kset;
528   - kobject_init_ng(&dev->kobj, &device_ktype);
  528 + kobject_init(&dev->kobj, &device_ktype);
529 529 klist_init(&dev->klist_children, klist_children_get,
530 530 klist_children_put);
531 531 INIT_LIST_HEAD(&dev->dma_pools);
... ... @@ -2033,7 +2033,7 @@
2033 2033 if (err)
2034 2034 goto abort_free;
2035 2035  
2036   - kobject_init_ng(&rdev->kobj, &rdev_ktype);
  2036 + kobject_init(&rdev->kobj, &rdev_ktype);
2037 2037  
2038 2038 rdev->desc_nr = -1;
2039 2039 rdev->saved_raid_disk = -1;
drivers/net/iseries_veth.c
... ... @@ -844,7 +844,7 @@
844 844  
845 845 /* This gets us 1 reference, which is held on behalf of the driver
846 846 * infrastructure. It's released at module unload. */
847   - kobject_init_ng(&cnx->kobject, &veth_lpar_connection_ktype);
  847 + kobject_init(&cnx->kobject, &veth_lpar_connection_ktype);
848 848  
849 849 msgs = kcalloc(VETH_NUMBUFFERS, sizeof(struct veth_msg), GFP_KERNEL);
850 850 if (! msgs) {
... ... @@ -1083,7 +1083,7 @@
1083 1083 return NULL;
1084 1084 }
1085 1085  
1086   - kobject_init_ng(&port->kobject, &veth_port_ktype);
  1086 + kobject_init(&port->kobject, &veth_port_ktype);
1087 1087 if (0 != kobject_add(&port->kobject, &dev->dev.kobj, "veth_port"))
1088 1088 veth_error("Failed adding port for %s to sysfs.\n", dev->name);
1089 1089  
... ... @@ -169,7 +169,7 @@
169 169 map = kzalloc(sizeof(*map), GFP_KERNEL);
170 170 if (!map)
171 171 goto err;
172   - kobject_init_ng(&map->kobj, &map_attr_type);
  172 + kobject_init(&map->kobj, &map_attr_type);
173 173 map->mem = mem;
174 174 mem->map = map;
175 175 ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi);
... ... @@ -511,7 +511,7 @@
511 511 struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL);
512 512 if (p) {
513 513 INIT_LIST_HEAD(&p->list);
514   - kobject_init_ng(&p->kobj, &ktype_cdev_dynamic);
  514 + kobject_init(&p->kobj, &ktype_cdev_dynamic);
515 515 }
516 516 return p;
517 517 }
... ... @@ -528,7 +528,7 @@
528 528 {
529 529 memset(cdev, 0, sizeof *cdev);
530 530 INIT_LIST_HEAD(&cdev->list);
531   - kobject_init_ng(&cdev->kobj, &ktype_cdev_default);
  531 + kobject_init(&cdev->kobj, &ktype_cdev_default);
532 532 cdev->ops = fops;
533 533 }
534 534  
include/linux/kobject.h
... ... @@ -78,7 +78,7 @@
78 78 return kobj->k_name;
79 79 }
80 80  
81   -extern void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype);
  81 +extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
82 82 extern int __must_check kobject_add(struct kobject *kobj,
83 83 struct kobject *parent,
84 84 const char *fmt, ...);
... ... @@ -287,7 +287,7 @@
287 287 EXPORT_SYMBOL(kobject_set_name);
288 288  
289 289 /**
290   - * kobject_init_ng - initialize a kobject structure
  290 + * kobject_init - initialize a kobject structure
291 291 * @kobj: pointer to the kobject to initialize
292 292 * @ktype: pointer to the ktype for this kobject.
293 293 *
... ... @@ -298,7 +298,7 @@
298 298 * to kobject_put(), not by a call to kfree directly to ensure that all of
299 299 * the memory is cleaned up properly.
300 300 */
301   -void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype)
  301 +void kobject_init(struct kobject *kobj, struct kobj_type *ktype)
302 302 {
303 303 char *err_str;
304 304  
... ... @@ -326,7 +326,7 @@
326 326 printk(KERN_ERR "kobject: %s\n", err_str);
327 327 dump_stack();
328 328 }
329   -EXPORT_SYMBOL(kobject_init_ng);
  329 +EXPORT_SYMBOL(kobject_init);
330 330  
331 331 static int kobject_add_varg(struct kobject *kobj, struct kobject *parent,
332 332 const char *fmt, va_list vargs)
... ... @@ -401,7 +401,7 @@
401 401 * @parent: pointer to the parent of this kobject.
402 402 * @fmt: the name of the kobject.
403 403 *
404   - * This function combines the call to kobject_init_ng() and
  404 + * This function combines the call to kobject_init() and
405 405 * kobject_add(). The same type of error handling after a call to
406 406 * kobject_add() and kobject lifetime rules are the same here.
407 407 */
... ... @@ -411,7 +411,7 @@
411 411 va_list args;
412 412 int retval;
413 413  
414   - kobject_init_ng(kobj, ktype);
  414 + kobject_init(kobj, ktype);
415 415  
416 416 va_start(args, fmt);
417 417 retval = kobject_add_varg(kobj, parent, fmt, args);
... ... @@ -636,7 +636,7 @@
636 636 *
637 637 * If the kobject was not able to be created, NULL will be returned.
638 638 * The kobject structure returned from here must be cleaned up with a
639   - * call to kobject_put() and not kfree(), as kobject_init_ng() has
  639 + * call to kobject_put() and not kfree(), as kobject_init() has
640 640 * already been called on this structure.
641 641 */
642 642 struct kobject *kobject_create(void)
... ... @@ -647,7 +647,7 @@
647 647 if (!kobj)
648 648 return NULL;
649 649  
650   - kobject_init_ng(kobj, &dynamic_kobj_ktype);
  650 + kobject_init(kobj, &dynamic_kobj_ktype);
651 651 return kobj;
652 652 }
653 653