Browse Source

gpio: omap: Pass correct argument to _get_gpio_direction()

Pass bank rather than bank->base to _get_gpio_direction().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Glass <sjg@chromium.org>
Axel Lin 10 năm trước cách đây
mục cha
commit
26c0472cb0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/gpio/omap_gpio.c

+ 1 - 1
drivers/gpio/omap_gpio.c

@@ -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;