Commit b2d6db5878a0832659ed58476357eea2db915550

Authored by Greg Kroah-Hartman
1 parent 9e7bbccd02

Kobject: rename kobject_add_ng() to kobject_add()

Now that the old kobject_add() function is gone, rename kobject_add_ng()
to kobject_add() 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 22 additions and 22 deletions Side-by-side Diff

... ... @@ -929,7 +929,7 @@
929 929 elevator_t *e = q->elevator;
930 930 int error;
931 931  
932   - error = kobject_add_ng(&e->kobj, &q->kobj, "%s", "iosched");
  932 + error = kobject_add(&e->kobj, &q->kobj, "%s", "iosched");
933 933 if (!error) {
934 934 struct elv_fs_entry *attr = e->elevator_type->elevator_attrs;
935 935 if (attr) {
... ... @@ -4180,8 +4180,8 @@
4180 4180 if (!q || !q->request_fn)
4181 4181 return -ENXIO;
4182 4182  
4183   - ret = kobject_add_ng(&q->kobj, kobject_get(&disk->dev.kobj),
4184   - "%s", "queue");
  4183 + ret = kobject_add(&q->kobj, kobject_get(&disk->dev.kobj),
  4184 + "%s", "queue");
4185 4185 if (ret < 0)
4186 4186 return ret;
4187 4187  
drivers/base/class.c
... ... @@ -586,8 +586,8 @@
586 586 else
587 587 class_dev->kobj.parent = &parent_class->subsys.kobj;
588 588  
589   - error = kobject_add_ng(&class_dev->kobj, class_dev->kobj.parent,
590   - "%s", class_dev->class_id);
  589 + error = kobject_add(&class_dev->kobj, class_dev->kobj.parent,
  590 + "%s", class_dev->class_id);
591 591 if (error)
592 592 goto out2;
593 593  
... ... @@ -602,7 +602,7 @@
602 602 if (!k)
603 603 return NULL;
604 604 k->kset = &dev->class->class_dirs;
605   - retval = kobject_add_ng(k, parent_kobj, "%s", dev->class->name);
  605 + retval = kobject_add(k, parent_kobj, "%s", dev->class->name);
606 606 if (retval < 0) {
607 607 kobject_put(k);
608 608 return NULL;
... ... @@ -776,7 +776,7 @@
776 776 * This is part 2 of device_register(), though may be called
777 777 * separately _iff_ device_initialize() has been called separately.
778 778 *
779   - * This adds it to the kobject hierarchy via kobject_add_ng(), adds it
  779 + * This adds it to the kobject hierarchy via kobject_add(), adds it
780 780 * to the global and sibling lists for the device, then
781 781 * adds it to the other relevant subsystems of the driver model.
782 782 */
... ... @@ -807,7 +807,7 @@
807 807 goto Error;
808 808  
809 809 /* first, register with generic layer. */
810   - error = kobject_add_ng(&dev->kobj, dev->kobj.parent, "%s", dev->bus_id);
  810 + error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev->bus_id);
811 811 if (error)
812 812 goto Error;
813 813  
drivers/base/driver.c
... ... @@ -144,7 +144,7 @@
144 144 if (!name)
145 145 return -ENOMEM;
146 146  
147   - return kobject_add_ng(kobj, &drv->p->kobj, "%s", name);
  147 + return kobject_add(kobj, &drv->p->kobj, "%s", name);
148 148 }
149 149 EXPORT_SYMBOL_GPL(driver_add_kobj);
150 150  
... ... @@ -1389,7 +1389,7 @@
1389 1389 rdev->mddev = mddev;
1390 1390 printk(KERN_INFO "md: bind<%s>\n", b);
1391 1391  
1392   - if ((err = kobject_add_ng(&rdev->kobj, &mddev->kobj, "dev-%s", b)))
  1392 + if ((err = kobject_add(&rdev->kobj, &mddev->kobj, "dev-%s", b)))
1393 1393 goto fail;
1394 1394  
1395 1395 if (rdev->bdev->bd_part)
drivers/net/iseries_veth.c
... ... @@ -1084,7 +1084,7 @@
1084 1084 }
1085 1085  
1086 1086 kobject_init_ng(&port->kobject, &veth_port_ktype);
1087   - if (0 != kobject_add_ng(&port->kobject, &dev->dev.kobj, "veth_port"))
  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  
1090 1090 veth_info("%s attached to iSeries vlan %d (LPAR map = 0x%.4X)\n",
... ... @@ -172,7 +172,7 @@
172 172 kobject_init_ng(&map->kobj, &map_attr_type);
173 173 map->mem = mem;
174 174 mem->map = map;
175   - ret = kobject_add_ng(&map->kobj, idev->map_dir, "map%d", mi);
  175 + ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi);
176 176 if (ret)
177 177 goto err;
178 178 ret = kobject_uevent(&map->kobj, KOBJ_ADD);
include/linux/kobject.h
... ... @@ -80,9 +80,9 @@
80 80  
81 81 extern void kobject_init(struct kobject *);
82 82 extern void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype);
83   -extern int __must_check kobject_add_ng(struct kobject *kobj,
84   - struct kobject *parent,
85   - const char *fmt, ...);
  83 +extern int __must_check kobject_add(struct kobject *kobj,
  84 + struct kobject *parent,
  85 + const char *fmt, ...);
86 86 extern int __must_check kobject_init_and_add(struct kobject *kobj,
87 87 struct kobj_type *ktype,
88 88 struct kobject *parent,
... ... @@ -350,7 +350,7 @@
350 350 }
351 351  
352 352 /**
353   - * kobject_add_ng - the main kobject add function
  353 + * kobject_add - the main kobject add function
354 354 * @kobj: the kobject to add
355 355 * @parent: pointer to the parent of the kobject.
356 356 * @fmt: format to name the kobject with.
... ... @@ -381,8 +381,8 @@
381 381 * kobject_uevent() with the UEVENT_ADD parameter to ensure that
382 382 * userspace is properly notified of this kobject's creation.
383 383 */
384   -int kobject_add_ng(struct kobject *kobj, struct kobject *parent,
385   - const char *fmt, ...)
  384 +int kobject_add(struct kobject *kobj, struct kobject *parent,
  385 + const char *fmt, ...)
386 386 {
387 387 va_list args;
388 388 int retval;
... ... @@ -396,7 +396,7 @@
396 396  
397 397 return retval;
398 398 }
399   -EXPORT_SYMBOL(kobject_add_ng);
  399 +EXPORT_SYMBOL(kobject_add);
400 400  
401 401 /**
402 402 * kobject_init_and_add - initialize a kobject structure and add it to the kobject hierarchy
... ... @@ -406,8 +406,8 @@
406 406 * @fmt: the name of the kobject.
407 407 *
408 408 * This function combines the call to kobject_init_ng() and
409   - * kobject_add_ng(). The same type of error handling after a call to
410   - * kobject_add_ng() and kobject lifetime rules are the same here.
  409 + * kobject_add(). The same type of error handling after a call to
  410 + * kobject_add() and kobject lifetime rules are the same here.
411 411 */
412 412 int kobject_init_and_add(struct kobject *kobj, struct kobj_type *ktype,
413 413 struct kobject *parent, const char *fmt, ...)
... ... @@ -677,7 +677,7 @@
677 677 if (!kobj)
678 678 return NULL;
679 679  
680   - retval = kobject_add_ng(kobj, parent, "%s", name);
  680 + retval = kobject_add(kobj, parent, "%s", name);
681 681 if (retval) {
682 682 printk(KERN_WARNING "%s: kobject_add error: %d\n",
683 683 __FUNCTION__, retval);