Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67949
b: refs/heads/master
c: d716551
h: refs/heads/master
i:
  67947: 9dc9d84
v: v3
  • Loading branch information
Cornelia Huck authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent 0abe0f2 commit 018b92e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce2c9cb0259acd2aed184499ebe41ab00da13b25
refs/heads/master: d716551e188787effb08bf87a846404cfd239a8b
21 changes: 2 additions & 19 deletions trunk/Documentation/kobject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ embedded in larger data structures and replace fields they duplicate.

struct kobject {
const char * k_name;
char name[KOBJ_NAME_LEN];
struct kref kref;
struct list_head entry;
struct kobject * parent;
Expand Down Expand Up @@ -223,41 +222,25 @@ decl_subsys(devices, &ktype_device, &device_uevent_ops);
is equivalent to doing:

struct kset devices_subsys = {
.kobj = {
.name = "devices",
},
.ktype = &ktype_devices,
.uevent_ops = &device_uevent_ops,
};

kobject_set_name(&devices_subsys, name);

The objects that are registered with a subsystem that use the
subsystem's default list must have their kset ptr set properly. These
objects may have embedded kobjects or ksets. The
following helpers make setting the kset easier:
following helper makes setting the kset easier:


kobj_set_kset_s(obj,subsys)

- Assumes that obj->kobj exists, and is a struct kobject.
- Sets the kset of that kobject to the kset <subsys>.


kset_set_kset_s(obj,subsys)

- Assumes that obj->kset exists, and is a struct kset.
- Sets the kset of the embedded kobject to the kset <subsys>.

subsys_set_kset(obj,subsys)

- Assumes obj->subsys exists, and is a struct subsystem.
- Sets obj->subsys.kset.kobj.kset to the subsystem's embedded kset.

void subsystem_init(struct kset *s);
int subsystem_register(struct kset *s);
void subsystem_unregister(struct kset *s);
struct kset *subsys_get(struct kset *s);
void kset_put(struct kset *s);

These are just wrappers around the respective kset_* functions.

Expand Down

0 comments on commit 018b92e

Please sign in to comment.