Commit e1543ddf authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Kobject: remove kobject_init() as no one uses it anymore

The old kobject_init() function is on longer in use, so let us remove it
from the public scope (kset mess in the kobject.c file still uses it,
but that can be cleaned up later very simply.)

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b2d6db58
...@@ -78,7 +78,6 @@ static inline const char * kobject_name(const struct kobject * kobj) ...@@ -78,7 +78,6 @@ static inline const char * kobject_name(const struct kobject * kobj)
return kobj->k_name; return kobj->k_name;
} }
extern void kobject_init(struct kobject *);
extern void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype); extern void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype);
extern int __must_check kobject_add(struct kobject *kobj, extern int __must_check kobject_add(struct kobject *kobj,
struct kobject *parent, struct kobject *parent,
......
...@@ -124,11 +124,7 @@ char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask) ...@@ -124,11 +124,7 @@ char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask)
} }
EXPORT_SYMBOL_GPL(kobject_get_path); EXPORT_SYMBOL_GPL(kobject_get_path);
/** static void kobject_init_internal(struct kobject * kobj)
* kobject_init - initialize object.
* @kobj: object in question.
*/
void kobject_init(struct kobject * kobj)
{ {
if (!kobj) if (!kobj)
return; return;
...@@ -232,7 +228,7 @@ int kobject_register(struct kobject * kobj) ...@@ -232,7 +228,7 @@ int kobject_register(struct kobject * kobj)
{ {
int error = -EINVAL; int error = -EINVAL;
if (kobj) { if (kobj) {
kobject_init(kobj); kobject_init_internal(kobj);
error = kobject_add(kobj); error = kobject_add(kobj);
if (!error) if (!error)
kobject_uevent(kobj, KOBJ_ADD); kobject_uevent(kobj, KOBJ_ADD);
...@@ -695,7 +691,7 @@ EXPORT_SYMBOL_GPL(kobject_create_and_add); ...@@ -695,7 +691,7 @@ EXPORT_SYMBOL_GPL(kobject_create_and_add);
void kset_init(struct kset * k) void kset_init(struct kset * k)
{ {
kobject_init(&k->kobj); kobject_init_internal(&k->kobj);
INIT_LIST_HEAD(&k->list); INIT_LIST_HEAD(&k->list);
spin_lock_init(&k->list_lock); spin_lock_init(&k->list_lock);
} }
...@@ -887,7 +883,6 @@ struct kset *kset_create_and_add(const char *name, ...@@ -887,7 +883,6 @@ struct kset *kset_create_and_add(const char *name,
} }
EXPORT_SYMBOL_GPL(kset_create_and_add); EXPORT_SYMBOL_GPL(kset_create_and_add);
EXPORT_SYMBOL(kobject_init);
EXPORT_SYMBOL(kobject_register); EXPORT_SYMBOL(kobject_register);
EXPORT_SYMBOL(kobject_unregister); EXPORT_SYMBOL(kobject_unregister);
EXPORT_SYMBOL(kobject_get); EXPORT_SYMBOL(kobject_get);
......
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