Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75817
b: refs/heads/master
c: 60728d6
h: refs/heads/master
i:
  75815: 728d317
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent fd6e1a3 commit c3ae86a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 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: 52840bd628707979b5bbcce3c506786d3a69dba0
refs/heads/master: 60728d62e4d273776e9ef9704f9ff8e8a248a8a1
10 changes: 3 additions & 7 deletions trunk/drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,7 @@ static struct class_device_attribute class_uevent_attr =
void class_device_initialize(struct class_device *class_dev)
{
class_dev->kobj.kset = &class_obj_subsys;
class_dev->kobj.ktype = &class_device_ktype;
kobject_init(&class_dev->kobj);
kobject_init_ng(&class_dev->kobj, &class_device_ktype);
INIT_LIST_HEAD(&class_dev->node);
}

Expand Down Expand Up @@ -575,16 +574,13 @@ int class_device_add(struct class_device *class_dev)
class_dev->class_id);

/* first, register with generic layer. */
error = kobject_set_name(&class_dev->kobj, "%s", class_dev->class_id);
if (error)
goto out2;

if (parent_class_dev)
class_dev->kobj.parent = &parent_class_dev->kobj;
else
class_dev->kobj.parent = &parent_class->subsys.kobj;

error = kobject_add(&class_dev->kobj);
error = kobject_add_ng(&class_dev->kobj, class_dev->kobj.parent,
"%s", class_dev->class_id);
if (error)
goto out2;

Expand Down

0 comments on commit c3ae86a

Please sign in to comment.