aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kobject.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 49a08f84d7c3..949706c33622 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -111,9 +111,15 @@ struct kobj_type {
111 struct attribute ** default_attrs; 111 struct attribute ** default_attrs;
112}; 112};
113 113
114struct kset_uevent_ops {
115 int (*filter)(struct kset *kset, struct kobject *kobj);
116 const char *(*name)(struct kset *kset, struct kobject *kobj);
117 int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp,
118 int num_envp, char *buffer, int buffer_size);
119};
114 120
115/** 121/*
116 * kset - a set of kobjects of a specific type, belonging 122 * struct kset - a set of kobjects of a specific type, belonging
117 * to a specific subsystem. 123 * to a specific subsystem.
118 * 124 *
119 * All kobjects of a kset should be embedded in an identical 125 * All kobjects of a kset should be embedded in an identical
@@ -129,13 +135,6 @@ struct kobj_type {
129 * supress the event generation or add subsystem specific 135 * supress the event generation or add subsystem specific
130 * variables carried with the event. 136 * variables carried with the event.
131 */ 137 */
132struct kset_uevent_ops {
133 int (*filter)(struct kset *kset, struct kobject *kobj);
134 const char *(*name)(struct kset *kset, struct kobject *kobj);
135 int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp,
136 int num_envp, char *buffer, int buffer_size);
137};
138
139struct kset { 138struct kset {
140 struct kobj_type * ktype; 139 struct kobj_type * ktype;
141 struct list_head list; 140 struct list_head list;
@@ -176,7 +175,7 @@ static inline struct kobj_type * get_ktype(struct kobject * k)
176extern struct kobject * kset_find_obj(struct kset *, const char *); 175extern struct kobject * kset_find_obj(struct kset *, const char *);
177 176
178 177
179/** 178/*
180 * Use this when initializing an embedded kset with no other 179 * Use this when initializing an embedded kset with no other
181 * fields to initialize. 180 * fields to initialize.
182 */ 181 */
@@ -201,7 +200,7 @@ extern struct kset kernel_subsys;
201/* The global /sys/hypervisor/ subsystem */ 200/* The global /sys/hypervisor/ subsystem */
202extern struct kset hypervisor_subsys; 201extern struct kset hypervisor_subsys;
203 202
204/** 203/*
205 * Helpers for setting the kset of registered objects. 204 * Helpers for setting the kset of registered objects.
206 * Often, a registered object belongs to a kset embedded in a 205 * Often, a registered object belongs to a kset embedded in a
207 * subsystem. These do no magic, just make the resulting code 206 * subsystem. These do no magic, just make the resulting code
@@ -236,7 +235,7 @@ extern struct kset hypervisor_subsys;
236/** 235/**
237 * subsys_set_kset(obj,subsys) - set kset for subsystem 236 * subsys_set_kset(obj,subsys) - set kset for subsystem
238 * @obj: ptr to some object type. 237 * @obj: ptr to some object type.
239 * @subsys: a subsystem object (not a ptr). 238 * @_subsys: a subsystem object (not a ptr).
240 * 239 *
241 * Can be used for any object type with an embedded ->subsys. 240 * Can be used for any object type with an embedded ->subsys.
242 * Sets the kset of @obj's kobject to @subsys.kset. This makes 241 * Sets the kset of @obj's kobject to @subsys.kset. This makes