Commit 2753133e authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Greg Kroah-Hartman

kobject: Comment and warning fixes to kobject.c

This dots some i's and crosses some t's after left over from when
kobject_kset_add_dir was built from kobject_add_dir. 
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 22af74f3
...@@ -519,7 +519,7 @@ static struct kobj_type dir_ktype = { ...@@ -519,7 +519,7 @@ static struct kobj_type dir_ktype = {
}; };
/** /**
* kobject__kset_add_dir - add sub directory of object. * kobject_kset_add_dir - add sub directory of object.
* @kset: kset the directory is belongs to. * @kset: kset the directory is belongs to.
* @parent: object in which a directory is created. * @parent: object in which a directory is created.
* @name: directory name. * @name: directory name.
...@@ -545,8 +545,8 @@ struct kobject *kobject_kset_add_dir(struct kset *kset, ...@@ -545,8 +545,8 @@ struct kobject *kobject_kset_add_dir(struct kset *kset,
kobject_set_name(k, name); kobject_set_name(k, name);
ret = kobject_register(k); ret = kobject_register(k);
if (ret < 0) { if (ret < 0) {
printk(KERN_WARNING "kobject_add_dir: " printk(KERN_WARNING "%s: kobject_register error: %d\n",
"kobject_register error: %d\n", ret); __func__, ret);
kobject_del(k); kobject_del(k);
return NULL; return NULL;
} }
...@@ -554,6 +554,13 @@ struct kobject *kobject_kset_add_dir(struct kset *kset, ...@@ -554,6 +554,13 @@ struct kobject *kobject_kset_add_dir(struct kset *kset,
return k; return k;
} }
/**
* kobject_add_dir - add sub directory of object.
* @parent: object in which a directory is created.
* @name: directory name.
*
* Add a plain directory object as child of given object.
*/
struct kobject *kobject_add_dir(struct kobject *parent, const char *name) struct kobject *kobject_add_dir(struct kobject *parent, const char *name)
{ {
return kobject_kset_add_dir(NULL, parent, name); return kobject_kset_add_dir(NULL, parent, name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment