提交 12e339ac 编写于 作者: G Greg Kroah-Hartman

Kset: remove kset_add function

No one is calling this anymore, so just remove it and hard-code the one
internal-use of it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 6d06adfa
...@@ -158,7 +158,6 @@ struct kset { ...@@ -158,7 +158,6 @@ struct kset {
}; };
extern void kset_init(struct kset * k); extern void kset_init(struct kset * k);
extern int __must_check kset_add(struct kset * k);
extern int __must_check kset_register(struct kset * k); extern int __must_check kset_register(struct kset * k);
extern void kset_unregister(struct kset * k); extern void kset_unregister(struct kset * k);
extern struct kset * __must_check kset_create_and_add(const char *name, extern struct kset * __must_check kset_create_and_add(const char *name,
......
...@@ -709,17 +709,6 @@ struct sysfs_ops kobj_sysfs_ops = { ...@@ -709,17 +709,6 @@ struct sysfs_ops kobj_sysfs_ops = {
.store = kobj_attr_store, .store = kobj_attr_store,
}; };
/**
* kset_add - add a kset object to the hierarchy.
* @k: kset.
*/
int kset_add(struct kset * k)
{
return kobject_add_internal(&k->kobj);
}
/** /**
* kset_register - initialize and add a kset. * kset_register - initialize and add a kset.
* @k: kset. * @k: kset.
...@@ -733,7 +722,7 @@ int kset_register(struct kset * k) ...@@ -733,7 +722,7 @@ int kset_register(struct kset * k)
return -EINVAL; return -EINVAL;
kset_init(k); kset_init(k);
err = kset_add(k); err = kobject_add_internal(&k->kobj);
if (err) if (err)
return err; return err;
kobject_uevent(&k->kobj, KOBJ_ADD); kobject_uevent(&k->kobj, KOBJ_ADD);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册