aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-12-18 01:05:35 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:38 -0500
commitf9cb074bff8e762ef24c44678a5a7d907f82fbeb (patch)
tree50438fc90b8f6170dd8eb5d43712c61719a16304
parente1543ddf739b22a8c4218716ad50c26b3e147403 (diff)
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>
-rw-r--r--block/elevator.c2
-rw-r--r--block/ll_rw_blk.c2
-rw-r--r--drivers/base/class.c2
-rw-r--r--drivers/base/core.c2
-rw-r--r--drivers/md/md.c2
-rw-r--r--drivers/net/iseries_veth.c4
-rw-r--r--drivers/uio/uio.c2
-rw-r--r--fs/char_dev.c4
-rw-r--r--include/linux/kobject.h2
-rw-r--r--lib/kobject.c14
10 files changed, 18 insertions, 18 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 645469a4f49f..f9736fbdab03 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -185,7 +185,7 @@ static elevator_t *elevator_alloc(struct request_queue *q,
185 185
186 eq->ops = &e->ops; 186 eq->ops = &e->ops;
187 eq->elevator_type = e; 187 eq->elevator_type = e;
188 kobject_init_ng(&eq->kobj, &elv_ktype); 188 kobject_init(&eq->kobj, &elv_ktype);
189 mutex_init(&eq->sysfs_lock); 189 mutex_init(&eq->sysfs_lock);
190 190
191 eq->hash = kmalloc_node(sizeof(struct hlist_head) * ELV_HASH_ENTRIES, 191 eq->hash = kmalloc_node(sizeof(struct hlist_head) * ELV_HASH_ENTRIES,
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 234dd3de1824..5ccec8aa964b 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1862,7 +1862,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
1862 1862
1863 init_timer(&q->unplug_timer); 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 mutex_init(&q->sysfs_lock); 1867 mutex_init(&q->sysfs_lock);
1868 1868
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 8e3cba224384..61fd26cc9f0e 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -553,7 +553,7 @@ static struct class_device_attribute class_uevent_attr =
553void class_device_initialize(struct class_device *class_dev) 553void class_device_initialize(struct class_device *class_dev)
554{ 554{
555 class_dev->kobj.kset = &class_obj_subsys; 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 INIT_LIST_HEAD(&class_dev->node); 557 INIT_LIST_HEAD(&class_dev->node);
558} 558}
559 559
diff --git a/drivers/base/core.c b/drivers/base/core.c
index e88170293ca0..675a719dcdd2 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -525,7 +525,7 @@ static void klist_children_put(struct klist_node *n)
525void device_initialize(struct device *dev) 525void device_initialize(struct device *dev)
526{ 526{
527 dev->kobj.kset = devices_kset; 527 dev->kobj.kset = devices_kset;
528 kobject_init_ng(&dev->kobj, &device_ktype); 528 kobject_init(&dev->kobj, &device_ktype);
529 klist_init(&dev->klist_children, klist_children_get, 529 klist_init(&dev->klist_children, klist_children_get,
530 klist_children_put); 530 klist_children_put);
531 INIT_LIST_HEAD(&dev->dma_pools); 531 INIT_LIST_HEAD(&dev->dma_pools);
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 989d8549f988..ae800ba061a6 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2033,7 +2033,7 @@ static mdk_rdev_t *md_import_device(dev_t newdev, int super_format, int super_mi
2033 if (err) 2033 if (err)
2034 goto abort_free; 2034 goto abort_free;
2035 2035
2036 kobject_init_ng(&rdev->kobj, &rdev_ktype); 2036 kobject_init(&rdev->kobj, &rdev_ktype);
2037 2037
2038 rdev->desc_nr = -1; 2038 rdev->desc_nr = -1;
2039 rdev->saved_raid_disk = -1; 2039 rdev->saved_raid_disk = -1;
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index ee15667d6135..419861cbc65e 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -844,7 +844,7 @@ static int veth_init_connection(u8 rlp)
844 844
845 /* This gets us 1 reference, which is held on behalf of the driver 845 /* This gets us 1 reference, which is held on behalf of the driver
846 * infrastructure. It's released at module unload. */ 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 msgs = kcalloc(VETH_NUMBUFFERS, sizeof(struct veth_msg), GFP_KERNEL); 849 msgs = kcalloc(VETH_NUMBUFFERS, sizeof(struct veth_msg), GFP_KERNEL);
850 if (! msgs) { 850 if (! msgs) {
@@ -1083,7 +1083,7 @@ static struct net_device * __init veth_probe_one(int vlan,
1083 return NULL; 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 if (0 != kobject_add(&port->kobject, &dev->dev.kobj, "veth_port")) 1087 if (0 != kobject_add(&port->kobject, &dev->dev.kobj, "veth_port"))
1088 veth_error("Failed adding port for %s to sysfs.\n", dev->name); 1088 veth_error("Failed adding port for %s to sysfs.\n", dev->name);
1089 1089
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 1ec2d31f2639..f352731add64 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -169,7 +169,7 @@ static int uio_dev_add_attributes(struct uio_device *idev)
169 map = kzalloc(sizeof(*map), GFP_KERNEL); 169 map = kzalloc(sizeof(*map), GFP_KERNEL);
170 if (!map) 170 if (!map)
171 goto err; 171 goto err;
172 kobject_init_ng(&map->kobj, &map_attr_type); 172 kobject_init(&map->kobj, &map_attr_type);
173 map->mem = mem; 173 map->mem = mem;
174 mem->map = map; 174 mem->map = map;
175 ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi); 175 ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi);
diff --git a/fs/char_dev.c b/fs/char_dev.c
index b2dd5a036631..2c7a8b5b4598 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -511,7 +511,7 @@ struct cdev *cdev_alloc(void)
511 struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL); 511 struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL);
512 if (p) { 512 if (p) {
513 INIT_LIST_HEAD(&p->list); 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 return p; 516 return p;
517} 517}
@@ -528,7 +528,7 @@ void cdev_init(struct cdev *cdev, const struct file_operations *fops)
528{ 528{
529 memset(cdev, 0, sizeof *cdev); 529 memset(cdev, 0, sizeof *cdev);
530 INIT_LIST_HEAD(&cdev->list); 530 INIT_LIST_HEAD(&cdev->list);
531 kobject_init_ng(&cdev->kobj, &ktype_cdev_default); 531 kobject_init(&cdev->kobj, &ktype_cdev_default);
532 cdev->ops = fops; 532 cdev->ops = fops;
533} 533}
534 534
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 53458b674fae..d9d8c368f044 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -78,7 +78,7 @@ static inline const char * kobject_name(const struct kobject * kobj)
78 return kobj->k_name; 78 return kobj->k_name;
79} 79}
80 80
81extern void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype); 81extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
82extern int __must_check kobject_add(struct kobject *kobj, 82extern int __must_check kobject_add(struct kobject *kobj,
83 struct kobject *parent, 83 struct kobject *parent,
84 const char *fmt, ...); 84 const char *fmt, ...);
diff --git a/lib/kobject.c b/lib/kobject.c
index 10d977b6e69d..4cc231c86225 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -287,7 +287,7 @@ int kobject_set_name(struct kobject *kobj, const char *fmt, ...)
287EXPORT_SYMBOL(kobject_set_name); 287EXPORT_SYMBOL(kobject_set_name);
288 288
289/** 289/**
290 * kobject_init_ng - initialize a kobject structure 290 * kobject_init - initialize a kobject structure
291 * @kobj: pointer to the kobject to initialize 291 * @kobj: pointer to the kobject to initialize
292 * @ktype: pointer to the ktype for this kobject. 292 * @ktype: pointer to the ktype for this kobject.
293 * 293 *
@@ -298,7 +298,7 @@ EXPORT_SYMBOL(kobject_set_name);
298 * to kobject_put(), not by a call to kfree directly to ensure that all of 298 * to kobject_put(), not by a call to kfree directly to ensure that all of
299 * the memory is cleaned up properly. 299 * the memory is cleaned up properly.
300 */ 300 */
301void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype) 301void kobject_init(struct kobject *kobj, struct kobj_type *ktype)
302{ 302{
303 char *err_str; 303 char *err_str;
304 304
@@ -326,7 +326,7 @@ error:
326 printk(KERN_ERR "kobject: %s\n", err_str); 326 printk(KERN_ERR "kobject: %s\n", err_str);
327 dump_stack(); 327 dump_stack();
328} 328}
329EXPORT_SYMBOL(kobject_init_ng); 329EXPORT_SYMBOL(kobject_init);
330 330
331static int kobject_add_varg(struct kobject *kobj, struct kobject *parent, 331static int kobject_add_varg(struct kobject *kobj, struct kobject *parent,
332 const char *fmt, va_list vargs) 332 const char *fmt, va_list vargs)
@@ -401,7 +401,7 @@ EXPORT_SYMBOL(kobject_add);
401 * @parent: pointer to the parent of this kobject. 401 * @parent: pointer to the parent of this kobject.
402 * @fmt: the name of the kobject. 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 * kobject_add(). The same type of error handling after a call to 405 * kobject_add(). The same type of error handling after a call to
406 * kobject_add() and kobject lifetime rules are the same here. 406 * kobject_add() and kobject lifetime rules are the same here.
407 */ 407 */
@@ -411,7 +411,7 @@ int kobject_init_and_add(struct kobject *kobj, struct kobj_type *ktype,
411 va_list args; 411 va_list args;
412 int retval; 412 int retval;
413 413
414 kobject_init_ng(kobj, ktype); 414 kobject_init(kobj, ktype);
415 415
416 va_start(args, fmt); 416 va_start(args, fmt);
417 retval = kobject_add_varg(kobj, parent, fmt, args); 417 retval = kobject_add_varg(kobj, parent, fmt, args);
@@ -636,7 +636,7 @@ static struct kobj_type dynamic_kobj_ktype = {
636 * 636 *
637 * If the kobject was not able to be created, NULL will be returned. 637 * If the kobject was not able to be created, NULL will be returned.
638 * The kobject structure returned from here must be cleaned up with a 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 * already been called on this structure. 640 * already been called on this structure.
641 */ 641 */
642struct kobject *kobject_create(void) 642struct kobject *kobject_create(void)
@@ -647,7 +647,7 @@ struct kobject *kobject_create(void)
647 if (!kobj) 647 if (!kobj)
648 return NULL; 648 return NULL;
649 649
650 kobject_init_ng(kobj, &dynamic_kobj_ktype); 650 kobject_init(kobj, &dynamic_kobj_ktype);
651 return kobj; 651 return kobj;
652} 652}
653 653