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.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 05cc5b2ddfff..973aa7b39e02 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -117,29 +117,30 @@ struct kset_uevent_ops {
117 struct kobj_uevent_env *env); 117 struct kobj_uevent_env *env);
118}; 118};
119 119
120/* 120/**
121 * struct kset - a set of kobjects of a specific type, belonging 121 * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem.
122 * to a specific subsystem.
123 *
124 * All kobjects of a kset should be embedded in an identical
125 * type. This type may have a descriptor, which the kset points
126 * to. This allows there to exist sets of objects of the same
127 * type in different subsystems.
128 * 122 *
129 * A subsystem does not have to be a list of only one type 123 * A kset defines a group of kobjects. They can be individually
130 * of object; multiple ksets can belong to one subsystem. All 124 * different "types" but overall these kobjects all want to be grouped
131 * ksets of a subsystem share the subsystem's lock. 125 * together and operated on in the same manner. ksets are used to
126 * define the attribute callbacks and other common events that happen to
127 * a kobject.
132 * 128 *
133 * Each kset can support specific event variables; it can 129 * @ktype: the struct kobj_type for this specific kset
134 * supress the event generation or add subsystem specific 130 * @list: the list of all kobjects for this kset
135 * variables carried with the event. 131 * @list_lock: a lock for iterating over the kobjects
132 * @kobj: the embedded kobject for this kset (recursion, isn't it fun...)
133 * @uevent_ops: the set of uevent operations for this kset. These are
134 * called whenever a kobject has something happen to it so that the kset
135 * can add new environment variables, or filter out the uevents if so
136 * desired.
136 */ 137 */
137struct kset { 138struct kset {
138 struct kobj_type * ktype; 139 struct kobj_type *ktype;
139 struct list_head list; 140 struct list_head list;
140 spinlock_t list_lock; 141 spinlock_t list_lock;
141 struct kobject kobj; 142 struct kobject kobj;
142 struct kset_uevent_ops * uevent_ops; 143 struct kset_uevent_ops *uevent_ops;
143}; 144};
144 145
145 146