Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91404
b: refs/heads/master
c: c6a2a3d
h: refs/heads/master
v: v3
  • Loading branch information
Robert P. J. Day authored and Greg Kroah-Hartman committed Apr 20, 2008
1 parent c413a7d commit 871a9e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 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: c6f87733823d69a8f12e391688ceeb1ff4922530
refs/heads/master: c6a2a3dc26da72e431c293d02549593f9c041f63
10 changes: 2 additions & 8 deletions trunk/lib/kobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ static int create_dir(struct kobject *kobj)
return error;
}

static inline struct kobject *to_kobj(struct list_head *entry)
{
return container_of(entry, struct kobject, entry);
}

static int get_kobj_path_length(struct kobject *kobj)
{
int length = 1;
Expand Down Expand Up @@ -752,12 +747,11 @@ void kset_unregister(struct kset *k)
*/
struct kobject *kset_find_obj(struct kset *kset, const char *name)
{
struct list_head *entry;
struct kobject *k;
struct kobject *ret = NULL;

spin_lock(&kset->list_lock);
list_for_each(entry, &kset->list) {
struct kobject *k = to_kobj(entry);
list_for_each_entry(k, &kset->list, entry) {
if (kobject_name(k) && !strcmp(kobject_name(k), name)) {
ret = kobject_get(k);
break;
Expand Down

0 comments on commit 871a9e2

Please sign in to comment.