diff mbox series

[U-Boot,029/080] gpio: pca953x_gpio: Make live-tree compatible

Message ID 20170929125238.26226-29-mario.six@gdsys.cc
State Changes Requested
Delegated to: Wolfgang Denk
Headers show
Series [U-Boot,001/080] mpc8308rdb: Fix style violation | expand

Commit Message

Mario Six Sept. 29, 2017, 12:51 p.m. UTC
Make the pca953x_gpio driver compatible with a live device tree.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
---
 drivers/gpio/pca953x_gpio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--
2.11.0

Comments

Simon Glass Oct. 9, 2017, 4:47 a.m. UTC | #1
On 29 September 2017 at 06:51, Mario Six <mario.six@gdsys.cc> wrote:
> Make the pca953x_gpio driver compatible with a live device tree.
>
> Signed-off-by: Mario Six <mario.six@gdsys.cc>
> ---
>  drivers/gpio/pca953x_gpio.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c
index 9ad81fe2ba..05bc4049c2 100644
--- a/drivers/gpio/pca953x_gpio.c
+++ b/drivers/gpio/pca953x_gpio.c
@@ -50,8 +50,6 @@  enum {
 #define MAX_BANK 5
 #define BANK_SZ 8

-DECLARE_GLOBAL_DATA_PTR;
-
 /*
  * struct pca953x_info - Data for pca953x
  *
@@ -264,7 +262,7 @@  static int pca953x_probe(struct udevice *dev)
 		return -ENODEV;
 	}

-	addr = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "reg", 0);
+	addr = dev_read_addr(dev);
 	if (addr == 0)
 		return -ENODEV;