diff options
author | Stephen Warren <swarren@nvidia.com> | 2016-04-28 22:04:15 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-05-17 15:54:43 (GMT) |
commit | 35732098db382b48e3fb4f3595fc108f69ea4457 (patch) | |
tree | 5d78049bf27057fa6a944e2bc4c50adcdba0a6de /drivers/core/device.c | |
parent | 54693cbdca5724b8946d0522a736e8a49fa14c0c (diff) | |
download | u-boot-35732098db382b48e3fb4f3595fc108f69ea4457.tar.xz |
fdt: fix dev_get_addr_name node offset
Use the device's own DT offset, not the device's parent's.
Fixes: 43c4d44e3330 ("fdt: implement dev_get_addr_name()")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/device.c')
-rw-r--r-- | drivers/core/device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index 1322991..2b12ce7 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -657,8 +657,8 @@ fdt_addr_t dev_get_addr_name(struct udevice *dev, const char *name) #if CONFIG_IS_ENABLED(OF_CONTROL) int index; - index = fdt_find_string(gd->fdt_blob, dev->parent->of_offset, - "reg-names", name); + index = fdt_find_string(gd->fdt_blob, dev->of_offset, "reg-names", + name); if (index < 0) return index; |