diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kobject.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index 2882aff6f3d1..cecf2fbede3e 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -519,7 +519,7 @@ static struct kobj_type dir_ktype = { | |||
519 | }; | 519 | }; |
520 | 520 | ||
521 | /** | 521 | /** |
522 | * kobject__kset_add_dir - add sub directory of object. | 522 | * kobject_kset_add_dir - add sub directory of object. |
523 | * @kset: kset the directory is belongs to. | 523 | * @kset: kset the directory is belongs to. |
524 | * @parent: object in which a directory is created. | 524 | * @parent: object in which a directory is created. |
525 | * @name: directory name. | 525 | * @name: directory name. |
@@ -545,8 +545,8 @@ struct kobject *kobject_kset_add_dir(struct kset *kset, | |||
545 | kobject_set_name(k, name); | 545 | kobject_set_name(k, name); |
546 | ret = kobject_register(k); | 546 | ret = kobject_register(k); |
547 | if (ret < 0) { | 547 | if (ret < 0) { |
548 | printk(KERN_WARNING "kobject_add_dir: " | 548 | printk(KERN_WARNING "%s: kobject_register error: %d\n", |
549 | "kobject_register error: %d\n", ret); | 549 | __func__, ret); |
550 | kobject_del(k); | 550 | kobject_del(k); |
551 | return NULL; | 551 | return NULL; |
552 | } | 552 | } |
@@ -554,6 +554,13 @@ struct kobject *kobject_kset_add_dir(struct kset *kset, | |||
554 | return k; | 554 | return k; |
555 | } | 555 | } |
556 | 556 | ||
557 | /** | ||
558 | * kobject_add_dir - add sub directory of object. | ||
559 | * @parent: object in which a directory is created. | ||
560 | * @name: directory name. | ||
561 | * | ||
562 | * Add a plain directory object as child of given object. | ||
563 | */ | ||
557 | struct kobject *kobject_add_dir(struct kobject *parent, const char *name) | 564 | struct kobject *kobject_add_dir(struct kobject *parent, const char *name) |
558 | { | 565 | { |
559 | return kobject_kset_add_dir(NULL, parent, name); | 566 | return kobject_kset_add_dir(NULL, parent, name); |