@@ -54,7 +54,6 @@ embedded in larger data structures and replace fields they duplicate.
5454
5555struct kobject {
5656 const char * k_name;
57- char name[KOBJ_NAME_LEN];
5857 struct kref kref;
5958 struct list_head entry;
6059 struct kobject * parent;
@@ -223,41 +222,25 @@ decl_subsys(devices, &ktype_device, &device_uevent_ops);
223222is equivalent to doing:
224223
225224struct kset devices_subsys = {
226- .kobj = {
227- .name = "devices",
228- },
229225 .ktype = &ktype_devices,
230226 .uevent_ops = &device_uevent_ops,
231227};
232-
228+ kobject_set_name(&devices_subsys, name);
233229
234230The objects that are registered with a subsystem that use the
235231subsystem's default list must have their kset ptr set properly. These
236232objects may have embedded kobjects or ksets. The
237- following helpers make setting the kset easier:
233+ following helper makes setting the kset easier:
238234
239235
240236kobj_set_kset_s(obj,subsys)
241237
242238- Assumes that obj->kobj exists, and is a struct kobject.
243239- Sets the kset of that kobject to the kset <subsys>.
244240
245-
246- kset_set_kset_s(obj,subsys)
247-
248- - Assumes that obj->kset exists, and is a struct kset.
249- - Sets the kset of the embedded kobject to the kset <subsys>.
250-
251- subsys_set_kset(obj,subsys)
252-
253- - Assumes obj->subsys exists, and is a struct subsystem.
254- - Sets obj->subsys.kset.kobj.kset to the subsystem's embedded kset.
255-
256241void subsystem_init(struct kset *s);
257242int subsystem_register(struct kset *s);
258243void subsystem_unregister(struct kset *s);
259- struct kset *subsys_get(struct kset *s);
260- void kset_put(struct kset *s);
261244
262245These are just wrappers around the respective kset_* functions.
263246
0 commit comments