gpio: omap: Pass correct argument to _get_gpio_direction()
PATCH 1/1 gpio: omap: Pass correct argument to _get_gpio_direction()
Pass bank rather than bank->base to _get_gpio_direction().
--- drivers/gpio/omap_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/omap_gpio.c +1 -1
@@ -291,7 +291,7 @@ static int omap_gpio_get_function(struct udevice *dev, unsigned offset)struct gpio_bank *bank =dev_get_priv (dev);/* GPIOF_FUNC is not implemented yet */ -if (_get_gpio_direction (bank->base, offset) ==OMAP_GPIO_DIR_OUT ) +if (_get_gpio_direction (bank, offset) ==OMAP_GPIO_DIR_OUT )return GPIOF_OUTPUT ;else return GPIOF_INPUT ;
Signature · 1 line
1.9.1
PATCH 1/1 gpio: omap: Pass correct argument to _get_gpio_direction()
HI Axel,
Quoted 12 lines · Axel Lin
Pass bank rather than
bank->baseto_get_gpio_direction().Signed-off-by Axel Lin <[email protected]>--- drivers/gpio/omap_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/omap_gpio.c +0
-0
drivers/gpio/omap_gpio.c static int omap_gpio_get_function(struct udevice *dev, unsigned offset) · line 297
Quoted 8 lines
drivers/gpio/omap_gpio.c +1
-1@@ -291,7 +291,7 @@ static int omap_gpio_get_function(struct udevice *dev, unsigned offset)struct gpio_bank *bank =dev_get_priv (dev);/* GPIOF_FUNC is not implemented yet */ -if (_get_gpio_direction (bank->base, offset) ==OMAP_GPIO_DIR_OUT ) +if (_get_gpio_direction (bank, offset) ==OMAP_GPIO_DIR_OUT )return GPIOF_OUTPUT ;else return GPIOF_INPUT ;
Ah yes another reason why we need a struct rather than void * in struct gpio_bank.
Thanks for the patch, will pick up for u-boot-dm.
Regards,
Simon
PATCH 1/1 gpio: omap: Pass correct argument to _get_gpio_direction()
Quoted 27 lines · Simon Glass
HI Axel,
Quoted 12 lines · Axel Lin
Pass bank rather than
bank->baseto_get_gpio_direction().Signed-off-by Axel Lin <[email protected]>--- drivers/gpio/omap_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/omap_gpio.c +0
-0drivers/gpio/omap_gpio.c static int omap_gpio_get_function(struct udevice *dev, unsigned offset) · line 297
Quoted 8 lines
drivers/gpio/omap_gpio.c +1
-1@@ -291,7 +291,7 @@ static int omap_gpio_get_function(struct udevice *dev, unsigned offset)struct gpio_bank *bank =dev_get_priv (dev);/* GPIOF_FUNC is not implemented yet */ -if (_get_gpio_direction (bank->base, offset) ==OMAP_GPIO_DIR_OUT ) +if (_get_gpio_direction (bank, offset) ==OMAP_GPIO_DIR_OUT )return GPIOF_OUTPUT ;else return GPIOF_INPUT ;Ah yes another reason why we need a struct rather than void * in struct
gpio_bank.
Quoted 3 lines
Thanks for the patch, will pick up for u-boot-dm.
Acked-by Simon Glass <[email protected]>
Applied to u-boot-dm, thanks!