]> git.sur5r.net Git - u-boot/commitdiff
gpio: pca953x_gpio: Make live-tree compatible
authorMario Six <mario.six@gdsys.cc>
Mon, 15 Jan 2018 10:07:45 +0000 (11:07 +0100)
committerTom Rini <trini@konsulko.com>
Sun, 28 Jan 2018 14:36:28 +0000 (09:36 -0500)
Make the pca953x_gpio driver compatible with a live device tree.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
drivers/gpio/pca953x_gpio.c

index 5ea1e05eed5a46f32a71fefc70df8ab1cff1cb9f..a8a5a89c05c616804ba0fd1a77be9bdf93c3dcac 100644 (file)
@@ -50,8 +50,6 @@ enum {
 #define MAX_BANK 5
 #define BANK_SZ 8
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /*
  * struct pca953x_info - Data for pca953x
  *
@@ -253,7 +251,7 @@ static int pca953x_probe(struct udevice *dev)
        ulong driver_data;
        int ret;
 
-       addr = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "reg", 0);
+       addr = dev_read_addr(dev);
        if (addr == 0)
                return -ENODEV;