diff options
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r-- | include/linux/kobject.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 2d229327959e..bcd9cd173c2c 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/sysfs.h> | 22 | #include <linux/sysfs.h> |
23 | #include <linux/compiler.h> | ||
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
24 | #include <linux/rwsem.h> | 25 | #include <linux/rwsem.h> |
25 | #include <linux/kref.h> | 26 | #include <linux/kref.h> |
@@ -71,12 +72,12 @@ static inline const char * kobject_name(const struct kobject * kobj) | |||
71 | extern void kobject_init(struct kobject *); | 72 | extern void kobject_init(struct kobject *); |
72 | extern void kobject_cleanup(struct kobject *); | 73 | extern void kobject_cleanup(struct kobject *); |
73 | 74 | ||
74 | extern int kobject_add(struct kobject *); | 75 | extern int __must_check kobject_add(struct kobject *); |
75 | extern void kobject_del(struct kobject *); | 76 | extern void kobject_del(struct kobject *); |
76 | 77 | ||
77 | extern int kobject_rename(struct kobject *, const char *new_name); | 78 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
78 | 79 | ||
79 | extern int kobject_register(struct kobject *); | 80 | extern int __must_check kobject_register(struct kobject *); |
80 | extern void kobject_unregister(struct kobject *); | 81 | extern void kobject_unregister(struct kobject *); |
81 | 82 | ||
82 | extern struct kobject * kobject_get(struct kobject *); | 83 | extern struct kobject * kobject_get(struct kobject *); |
@@ -128,8 +129,8 @@ struct kset { | |||
128 | 129 | ||
129 | 130 | ||
130 | extern void kset_init(struct kset * k); | 131 | extern void kset_init(struct kset * k); |
131 | extern int kset_add(struct kset * k); | 132 | extern int __must_check kset_add(struct kset * k); |
132 | extern int kset_register(struct kset * k); | 133 | extern int __must_check kset_register(struct kset * k); |
133 | extern void kset_unregister(struct kset * k); | 134 | extern void kset_unregister(struct kset * k); |
134 | 135 | ||
135 | static inline struct kset * to_kset(struct kobject * kobj) | 136 | static inline struct kset * to_kset(struct kobject * kobj) |
@@ -239,7 +240,7 @@ extern struct subsystem hypervisor_subsys; | |||
239 | (obj)->subsys.kset.kobj.kset = &(_subsys).kset | 240 | (obj)->subsys.kset.kobj.kset = &(_subsys).kset |
240 | 241 | ||
241 | extern void subsystem_init(struct subsystem *); | 242 | extern void subsystem_init(struct subsystem *); |
242 | extern int subsystem_register(struct subsystem *); | 243 | extern int __must_check subsystem_register(struct subsystem *); |
243 | extern void subsystem_unregister(struct subsystem *); | 244 | extern void subsystem_unregister(struct subsystem *); |
244 | 245 | ||
245 | static inline struct subsystem * subsys_get(struct subsystem * s) | 246 | static inline struct subsystem * subsys_get(struct subsystem * s) |
@@ -258,7 +259,8 @@ struct subsys_attribute { | |||
258 | ssize_t (*store)(struct subsystem *, const char *, size_t); | 259 | ssize_t (*store)(struct subsystem *, const char *, size_t); |
259 | }; | 260 | }; |
260 | 261 | ||
261 | extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); | 262 | extern int __must_check subsys_create_file(struct subsystem * , |
263 | struct subsys_attribute *); | ||
262 | 264 | ||
263 | #if defined(CONFIG_HOTPLUG) | 265 | #if defined(CONFIG_HOTPLUG) |
264 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); | 266 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); |