diff options
author | Marek Vasut <marek.vasut+renesas@gmail.com> | 2018-01-17 22:36:37 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-01-24 23:27:21 +0100 |
commit | c493756ab4910b55af9dfe6682edce3af63ebf5c (patch) | |
tree | 8f625a3016e40ba4e48c28b678b7b279f183d4d9 | |
parent | b606e1bbc3428d0ebc320f11b361e1b79a21a640 (diff) | |
download | u-boot-c493756ab4910b55af9dfe6682edce3af63ebf5c.tar.gz |
serial: sh: Replace fdtdec_get_addr() with devfdt_get_addr()
Replace fdtdec_get_addr() with devfdt_get_addr() as the later one is
the current recommended practice.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
-rw-r--r-- | drivers/serial/serial_sh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c index d9db702803..c07ddc70dc 100644 --- a/drivers/serial/serial_sh.c +++ b/drivers/serial/serial_sh.c @@ -219,8 +219,8 @@ static int sh_serial_ofdata_to_platdata(struct udevice *dev) fdt_addr_t addr; int ret; - addr = fdtdec_get_addr(gd->fdt_blob, dev_of_offset(dev), "reg"); - if (addr == FDT_ADDR_T_NONE) + addr = devfdt_get_addr(dev); + if (!addr) return -EINVAL; plat->base = addr; |