mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
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:
parent
244f6cee9a
commit
c11c4154e7
2 changed files with 32 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue