Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75793
b: refs/heads/master
c: cfb36ff
h: refs/heads/master
i:
  75791: 6cfa365
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent 8d4647a commit b3f623e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: d76e15fb20eeb7632ef38876a884fe3508b2c01d
refs/heads/master: cfb36fff45e3997b8044c81045fc4869ba5f281a
6 changes: 3 additions & 3 deletions trunk/lib/kobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ void kobject_init(struct kobject * kobj)
return;
kref_init(&kobj->kref);
INIT_LIST_HEAD(&kobj->entry);
kobj->kset = kset_get(kobj->kset);
}


Expand Down Expand Up @@ -184,7 +183,7 @@ int kobject_add(struct kobject * kobj)
kobj->kset ? kobject_name(&kobj->kset->kobj) : "<NULL>" );

if (kobj->kset) {
spin_lock(&kobj->kset->list_lock);
kobj->kset = kset_get(kobj->kset);

if (!parent) {
parent = kobject_get(&kobj->kset->kobj);
Expand All @@ -196,7 +195,8 @@ int kobject_add(struct kobject * kobj)
kobject_get(parent);
}

list_add_tail(&kobj->entry,&kobj->kset->list);
spin_lock(&kobj->kset->list_lock);
list_add_tail(&kobj->entry, &kobj->kset->list);
spin_unlock(&kobj->kset->list_lock);
kobj->parent = parent;
}
Expand Down

0 comments on commit b3f623e

Please sign in to comment.