]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fdt: fix dev_get_addr_name node offset
authorStephen Warren <swarren@nvidia.com>
Thu, 28 Apr 2016 22:04:15 +0000 (16:04 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 17 May 2016 15:54:43 +0000 (09:54 -0600)
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>
drivers/core/device.c

index 1322991d6c7b6e0599679518543da7c5cdb7c5ad..2b12ce7835f07db1c2dace883f12cbe486659a85 100644 (file)
@@ -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;