From: Ley Foon Tan Date: Wed, 15 Aug 2018 18:05:54 +0000 (+0800) Subject: gpio: dwapb_gpio: Change to use dev_read_addr() X-Git-Tag: baikal/mips/sdk5.9~1544^2~4 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=7cb7bbb7166c6e3ee8fd3f0bd1a49b58a3beae52;p=uboot.git gpio: dwapb_gpio: Change to use dev_read_addr() This changes the driver to use dev_read_addr() which is safe both for flat trees and live trees. Signed-off-by: Ley Foon Tan --- diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c index 3f6f2e875a..0f6574d5da 100644 --- a/drivers/gpio/dwapb_gpio.c +++ b/drivers/gpio/dwapb_gpio.c @@ -159,7 +159,7 @@ static int gpio_dwapb_bind(struct udevice *dev) if (plat) return 0; - base = fdtdec_get_addr(blob, dev_of_offset(dev), "reg"); + base = dev_read_addr(dev); if (base == FDT_ADDR_T_NONE) { debug("Can't get the GPIO register base address\n"); return -ENXIO;