diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-04 00:31:08 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:10 -0500 |
commit | c11c4154e7ff4cebfadad849b1e22689d759c3f4 (patch) | |
tree | 2038ed1677f55d3dafca6faac4a7155fb1e19166 /include/linux/kobject.h | |
parent | 244f6cee9a928103132a722292bfa0eb84114b07 (diff) |
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>
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r-- | include/linux/kobject.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 57eea4cb940..e2b8c3dae42 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -84,6 +84,11 @@ extern int __must_check kobject_add(struct kobject *); | |||
84 | extern int __must_check kobject_add_ng(struct kobject *kobj, | 84 | extern int __must_check kobject_add_ng(struct kobject *kobj, |
85 | struct kobject *parent, | 85 | struct kobject *parent, |
86 | const char *fmt, ...); | 86 | const char *fmt, ...); |
87 | extern int __must_check kobject_init_and_add(struct kobject *kobj, | ||
88 | struct kobj_type *ktype, | ||
89 | struct kobject *parent, | ||
90 | const char *fmt, ...); | ||
91 | |||
87 | extern void kobject_del(struct kobject *); | 92 | extern void kobject_del(struct kobject *); |
88 | 93 | ||
89 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 94 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |