diff options
-rw-r--r-- | include/linux/kobject.h | 1 | ||||
-rw-r--r-- | lib/kobject.c | 11 |
2 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 84c5afd58899..53458b674fae 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -78,7 +78,6 @@ static inline const char * kobject_name(const struct kobject * kobj) | |||
78 | return kobj->k_name; | 78 | return kobj->k_name; |
79 | } | 79 | } |
80 | 80 | ||
81 | extern void kobject_init(struct kobject *); | ||
82 | extern void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype); | 81 | extern void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype); |
83 | extern int __must_check kobject_add(struct kobject *kobj, | 82 | extern int __must_check kobject_add(struct kobject *kobj, |
84 | struct kobject *parent, | 83 | struct kobject *parent, |
diff --git a/lib/kobject.c b/lib/kobject.c index 359e114790cb..10d977b6e69d 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -124,11 +124,7 @@ char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask) | |||
124 | } | 124 | } |
125 | EXPORT_SYMBOL_GPL(kobject_get_path); | 125 | EXPORT_SYMBOL_GPL(kobject_get_path); |
126 | 126 | ||
127 | /** | 127 | static void kobject_init_internal(struct kobject * kobj) |
128 | * kobject_init - initialize object. | ||
129 | * @kobj: object in question. | ||
130 | */ | ||
131 | void kobject_init(struct kobject * kobj) | ||
132 | { | 128 | { |
133 | if (!kobj) | 129 | if (!kobj) |
134 | return; | 130 | return; |
@@ -232,7 +228,7 @@ int kobject_register(struct kobject * kobj) | |||
232 | { | 228 | { |
233 | int error = -EINVAL; | 229 | int error = -EINVAL; |
234 | if (kobj) { | 230 | if (kobj) { |
235 | kobject_init(kobj); | 231 | kobject_init_internal(kobj); |
236 | error = kobject_add(kobj); | 232 | error = kobject_add(kobj); |
237 | if (!error) | 233 | if (!error) |
238 | kobject_uevent(kobj, KOBJ_ADD); | 234 | kobject_uevent(kobj, KOBJ_ADD); |
@@ -695,7 +691,7 @@ EXPORT_SYMBOL_GPL(kobject_create_and_add); | |||
695 | 691 | ||
696 | void kset_init(struct kset * k) | 692 | void kset_init(struct kset * k) |
697 | { | 693 | { |
698 | kobject_init(&k->kobj); | 694 | kobject_init_internal(&k->kobj); |
699 | INIT_LIST_HEAD(&k->list); | 695 | INIT_LIST_HEAD(&k->list); |
700 | spin_lock_init(&k->list_lock); | 696 | spin_lock_init(&k->list_lock); |
701 | } | 697 | } |
@@ -887,7 +883,6 @@ struct kset *kset_create_and_add(const char *name, | |||
887 | } | 883 | } |
888 | EXPORT_SYMBOL_GPL(kset_create_and_add); | 884 | EXPORT_SYMBOL_GPL(kset_create_and_add); |
889 | 885 | ||
890 | EXPORT_SYMBOL(kobject_init); | ||
891 | EXPORT_SYMBOL(kobject_register); | 886 | EXPORT_SYMBOL(kobject_register); |
892 | EXPORT_SYMBOL(kobject_unregister); | 887 | EXPORT_SYMBOL(kobject_unregister); |
893 | EXPORT_SYMBOL(kobject_get); | 888 | EXPORT_SYMBOL(kobject_get); |