]> git.sur5r.net Git - u-boot/commitdiff
serial: sh: Replace fdtdec_get_addr() with devfdt_get_addr()
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Wed, 17 Jan 2018 21:36:37 +0000 (22:36 +0100)
committerMarek Vasut <marex@denx.de>
Wed, 24 Jan 2018 22:27:21 +0000 (23:27 +0100)
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>
drivers/serial/serial_sh.c

index d9db702803cad66f2c036920af32fd7cadb01ba1..c07ddc70dc81ba198989140dca92d271fd6521c1 100644 (file)
@@ -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;