kobject: add kobject_init_and_add function
Also add a kobject_init_and_add function which bundles up what a lot of the current callers want to do all at once, and it properly handles the memory usages, unlike kobject_register(); Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -84,6 +84,11 @@ extern int __must_check kobject_add(struct kobject *);
|
||||
extern int __must_check kobject_add_ng(struct kobject *kobj,
|
||||
struct kobject *parent,
|
||||
const char *fmt, ...);
|
||||
extern int __must_check kobject_init_and_add(struct kobject *kobj,
|
||||
struct kobj_type *ktype,
|
||||
struct kobject *parent,
|
||||
const char *fmt, ...);
|
||||
|
||||
extern void kobject_del(struct kobject *);
|
||||
|
||||
extern int __must_check kobject_rename(struct kobject *, const char *new_name);
|
||||
|
Reference in New Issue
Block a user