From: Stephen Warren Date: Thu, 28 Apr 2016 22:04:15 +0000 (-0600) Subject: fdt: fix dev_get_addr_name node offset X-Git-Tag: v2016.07-rc1~203^2~78 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=35732098db382b48e3fb4f3595fc108f69ea4457;p=oweals%2Fu-boot.git 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 Acked-by: Simon Glass --- diff --git a/drivers/core/device.c b/drivers/core/device.c index 1322991d6c..2b12ce7835 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;