From: Mario Six Date: Mon, 15 Jan 2018 11:07:45 +0100 Subject: [U-Boot] [RESEND PATCH v2 2/7] gpio: pca953x_gpio: Make live-tree compatible In-Reply-To: <20180115100750.20455-1-mario.six@gdsys.cc> References: <20180115100750.20455-1-mario.six@gdsys.cc> Message-ID: <20180115100750.20455-2-mario.six@gdsys.cc> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Make the pca953x_gpio driver compatible with a live device tree. Reviewed-by: Simon Glass Signed-off-by: Mario Six --- v1 -> v2: None --- drivers/gpio/pca953x_gpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c index 5ea1e05eed..a8a5a89c05 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 * @@ -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; -- 2.11.0