Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118273
b: refs/heads/master
c: 6098e2e
h: refs/heads/master
i:
  118271: 6035509
v: v3
  • Loading branch information
Jeremy Kerr authored and Paul Mackerras committed Oct 31, 2008
1 parent 2f900f5 commit 15a3ccf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 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: 16c29d180becc5bdf92fd0fc7314a44a671b5f4e
refs/heads/master: 6098e2ee14849e0819ffa887ebf470dcfad4a2be
1 change: 0 additions & 1 deletion trunk/arch/powerpc/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ struct of_device *of_device_alloc(struct device_node *np,
dev->dev.parent = parent;
dev->dev.release = of_release_dev;
dev->dev.archdata.of_node = np;
set_dev_node(&dev->dev, of_node_to_nid(np));

if (bus_id)
strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE);
Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/of/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,16 @@ EXPORT_SYMBOL(of_release_dev);
int of_device_register(struct of_device *ofdev)
{
BUG_ON(ofdev->node == NULL);
return device_register(&ofdev->dev);

device_initialize(&ofdev->dev);

/* device_add will assume that this device is on the same node as
* the parent. If there is no parent defined, set the node
* explicitly */
if (!ofdev->dev.parent)
set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->node));

return device_add(&ofdev->dev);
}
EXPORT_SYMBOL(of_device_register);

Expand Down

0 comments on commit 15a3ccf

Please sign in to comment.