Kobject: rename kobject_init_ng() to kobject_init()
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 18 Dec 2007 06:05:35 +0000 (23:05 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Jan 2008 04:40:38 +0000 (20:40 -0800)
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>
block/elevator.c
block/ll_rw_blk.c
drivers/base/class.c
drivers/base/core.c
drivers/md/md.c
drivers/net/iseries_veth.c
drivers/uio/uio.c
fs/char_dev.c
include/linux/kobject.h
lib/kobject.c

index 645469a4f49fba15bce1ca543d94fcb31e7f1b85..f9736fbdab0308f7121694df2faa3ffa68258994 100644 (file)
@@ -185,7 +185,7 @@ static elevator_t *elevator_alloc(struct request_queue *q,
 
        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,
index 234dd3de18240edc0212827eb7ca9f7809671b02..5ccec8aa964bc51b386cb3dfc925be5825e65e67 100644 (file)
@@ -1862,7 +1862,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
 
        init_timer(&q->unplug_timer);
 
-       kobject_init_ng(&q->kobj, &queue_ktype);
+       kobject_init(&q->kobj, &queue_ktype);
 
        mutex_init(&q->sysfs_lock);
 
index 8e3cba2243841236afc6e725a803ff23eb8c1c2b..61fd26cc9f0e3093f868d7b3d1b02b9b350cfa72 100644 (file)
@@ -553,7 +553,7 @@ static struct class_device_attribute class_uevent_attr =
 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);
 }
 
index e88170293ca0dfae01905abd9edc67a60ecc096b..675a719dcdd29f5921552fbc945f13eafccd981d 100644 (file)
@@ -525,7 +525,7 @@ static void klist_children_put(struct klist_node *n)
 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);
index 989d8549f9884eb4b7c8af6793da0b1ef3c3ddb7..ae800ba061a68a6b3ecf813653203cedb3e7a2d2 100644 (file)
@@ -2033,7 +2033,7 @@ static mdk_rdev_t *md_import_device(dev_t newdev, int super_format, int super_mi
        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;
index ee15667d61355d1133d7c7b5cc55f458a9e4381d..419861cbc65ecb23ae1172b6559b402bc0caa8d6 100644 (file)
@@ -844,7 +844,7 @@ static int veth_init_connection(u8 rlp)
 
        /* 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) {
@@ -1083,7 +1083,7 @@ static struct net_device * __init veth_probe_one(int vlan,
                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);
 
index 1ec2d31f2639c7b9958e1163c4724bc5bd97279e..f352731add64ac11a732bbfcd1aa93c5a3749628 100644 (file)
@@ -169,7 +169,7 @@ static int uio_dev_add_attributes(struct uio_device *idev)
                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);
index b2dd5a0366316b4df53d0d208b444b4ca74bdd37..2c7a8b5b45989b25d40f8cb6a283d7ffb8940c5a 100644 (file)
@@ -511,7 +511,7 @@ struct cdev *cdev_alloc(void)
        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;
 }
@@ -528,7 +528,7 @@ void cdev_init(struct cdev *cdev, const struct file_operations *fops)
 {
        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;
 }
 
index 53458b674fae62a95f4c83cbbbae66d18cba56c4..d9d8c368f044224d5f1d8355f0bd478507736d12 100644 (file)
@@ -78,7 +78,7 @@ static inline const char * kobject_name(const struct kobject * kobj)
        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, ...);
index 10d977b6e69ddaf6e95eba08218f237a2368a355..4cc231c86225002cde065c1d66bbb084217ff9e6 100644 (file)
@@ -287,7 +287,7 @@ int kobject_set_name(struct kobject *kobj, 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.
  *
@@ -298,7 +298,7 @@ EXPORT_SYMBOL(kobject_set_name);
  * 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;
 
@@ -326,7 +326,7 @@ error:
        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)
@@ -401,7 +401,7 @@ EXPORT_SYMBOL(kobject_add);
  * @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.
  */
@@ -411,7 +411,7 @@ int kobject_init_and_add(struct kobject *kobj, struct kobj_type *ktype,
        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);
@@ -636,7 +636,7 @@ static struct kobj_type dynamic_kobj_ktype = {
  *
  * 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)
@@ -647,7 +647,7 @@ struct kobject *kobject_create(void)
        if (!kobj)
                return NULL;
 
-       kobject_init_ng(kobj, &dynamic_kobj_ktype);
+       kobject_init(kobj, &dynamic_kobj_ktype);
        return kobj;
 }