diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-11-19 09:48:07 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-11-19 09:48:07 -0500 |
commit | dba0a918722ee0f0ba3442575e4448c3ab622be4 (patch) | |
tree | fdb466cf09e7916135098d651b18924b2fe9ba5f /drivers/of/device.c | |
parent | 0996e6382482ce9014787693d3884e9468153a5c (diff) | |
parent | 7f0f598a0069d1ab072375965a4b69137233169c (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Diffstat (limited to 'drivers/of/device.c')
-rw-r--r-- | drivers/of/device.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c index 51e5214071da..224ae6bc67b6 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c | |||
@@ -105,7 +105,16 @@ EXPORT_SYMBOL(of_release_dev); | |||
105 | int of_device_register(struct of_device *ofdev) | 105 | int of_device_register(struct of_device *ofdev) |
106 | { | 106 | { |
107 | BUG_ON(ofdev->node == NULL); | 107 | BUG_ON(ofdev->node == NULL); |
108 | return device_register(&ofdev->dev); | 108 | |
109 | device_initialize(&ofdev->dev); | ||
110 | |||
111 | /* device_add will assume that this device is on the same node as | ||
112 | * the parent. If there is no parent defined, set the node | ||
113 | * explicitly */ | ||
114 | if (!ofdev->dev.parent) | ||
115 | set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->node)); | ||
116 | |||
117 | return device_add(&ofdev->dev); | ||
109 | } | 118 | } |
110 | EXPORT_SYMBOL(of_device_register); | 119 | EXPORT_SYMBOL(of_device_register); |
111 | 120 | ||