aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLey Foon Tan <ley.foon.tan@intel.com>2018-08-16 02:05:54 +0800
committerMarek Vasut <marex@denx.de>2018-09-15 03:17:01 +0200
commit9ea354444d156b1f7c1d1990a32215c257b38e16 (patch)
tree135124f8720fbff6612a08969fe75974e07f0476 /drivers
parentdb6a158bc3fbf44fa71d18bf92f48961a500b4cc (diff)
downloadu-boot-9ea354444d156b1f7c1d1990a32215c257b38e16.zip
u-boot-9ea354444d156b1f7c1d1990a32215c257b38e16.tar.gz
u-boot-9ea354444d156b1f7c1d1990a32215c257b38e16.tar.bz2
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 <ley.foon.tan@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/dwapb_gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c
index 3f6f2e8..0f6574d 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;