Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75818
b: refs/heads/master
c: 9990513
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent c3ae86a commit ef36d42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: 60728d62e4d273776e9ef9704f9ff8e8a248a8a1
refs/heads/master: 9990513c1ef040528c4e38163a073089d39c7903
8 changes: 3 additions & 5 deletions trunk/drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,7 @@ static void klist_children_put(struct klist_node *n)
void device_initialize(struct device *dev)
{
dev->kobj.kset = devices_kset;
dev->kobj.ktype = &device_ktype;
kobject_init(&dev->kobj);
kobject_init_ng(&dev->kobj, &device_ktype);
klist_init(&dev->klist_children, klist_children_get,
klist_children_put);
INIT_LIST_HEAD(&dev->dma_pools);
Expand Down Expand Up @@ -729,7 +728,7 @@ static void device_remove_class_symlinks(struct device *dev)
* This is part 2 of device_register(), though may be called
* separately _iff_ device_initialize() has been called separately.
*
* This adds it to the kobject hierarchy via kobject_add(), adds it
* This adds it to the kobject hierarchy via kobject_add_ng(), adds it
* to the global and sibling lists for the device, then
* adds it to the other relevant subsystems of the driver model.
*/
Expand Down Expand Up @@ -760,8 +759,7 @@ int device_add(struct device *dev)
goto Error;

/* first, register with generic layer. */
kobject_set_name(&dev->kobj, "%s", dev->bus_id);
error = kobject_add(&dev->kobj);
error = kobject_add_ng(&dev->kobj, dev->kobj.parent, "%s", dev->bus_id);
if (error)
goto Error;

Expand Down

0 comments on commit ef36d42

Please sign in to comment.