aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r--include/linux/kobject.h16
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)
71extern void kobject_init(struct kobject *); 72extern void kobject_init(struct kobject *);
72extern void kobject_cleanup(struct kobject *); 73extern void kobject_cleanup(struct kobject *);
73 74
74extern int kobject_add(struct kobject *); 75extern int __must_check kobject_add(struct kobject *);
75extern void kobject_del(struct kobject *); 76extern void kobject_del(struct kobject *);
76 77
77extern int kobject_rename(struct kobject *, const char *new_name); 78extern int __must_check kobject_rename(struct kobject *, const char *new_name);
78 79
79extern int kobject_register(struct kobject *); 80extern int __must_check kobject_register(struct kobject *);
80extern void kobject_unregister(struct kobject *); 81extern void kobject_unregister(struct kobject *);
81 82
82extern struct kobject * kobject_get(struct kobject *); 83extern struct kobject * kobject_get(struct kobject *);
@@ -128,8 +129,8 @@ struct kset {
128 129
129 130
130extern void kset_init(struct kset * k); 131extern void kset_init(struct kset * k);
131extern int kset_add(struct kset * k); 132extern int __must_check kset_add(struct kset * k);
132extern int kset_register(struct kset * k); 133extern int __must_check kset_register(struct kset * k);
133extern void kset_unregister(struct kset * k); 134extern void kset_unregister(struct kset * k);
134 135
135static inline struct kset * to_kset(struct kobject * kobj) 136static 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
241extern void subsystem_init(struct subsystem *); 242extern void subsystem_init(struct subsystem *);
242extern int subsystem_register(struct subsystem *); 243extern int __must_check subsystem_register(struct subsystem *);
243extern void subsystem_unregister(struct subsystem *); 244extern void subsystem_unregister(struct subsystem *);
244 245
245static inline struct subsystem * subsys_get(struct subsystem * s) 246static 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
261extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); 262extern int __must_check subsys_create_file(struct subsystem * ,
263 struct subsys_attribute *);
262 264
263#if defined(CONFIG_HOTPLUG) 265#if defined(CONFIG_HOTPLUG)
264void kobject_uevent(struct kobject *kobj, enum kobject_action action); 266void kobject_uevent(struct kobject *kobj, enum kobject_action action);