]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
gpio: da8xx_gpio: Fix compiler warning
authorVignesh Raghavendra <vigneshr@ti.com>
Tue, 28 Jan 2020 10:10:02 +0000 (15:40 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Tue, 4 Feb 2020 03:37:24 +0000 (09:07 +0530)
Fix below compiler warning for 64bit builds

drivers/gpio/da8xx_gpio.c: In function ‘davinci_get_gpio_bank’:
drivers/gpio/da8xx_gpio.c:446:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  return (struct davinci_gpio *)addr;

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
drivers/gpio/da8xx_gpio.c

index bd5a366aef3282ff332788821d393e534c66a4e8..d28e1fa14cd525e9a3218ef0ae1c2b9dbb4c013d 100644 (file)
@@ -434,7 +434,7 @@ int gpio_set_value(unsigned int gpio, int value)
 static struct davinci_gpio *davinci_get_gpio_bank(struct udevice *dev, unsigned int offset)
 {
        struct davinci_gpio_bank *bank = dev_get_priv(dev);
-       unsigned int addr;
+       unsigned long addr;
 
        /*
         * The device tree is not broken into banks but the infrastructure is