From b0c4ae1a5176632e17627f05ae54be1b1bea3082 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 20 Dec 2014 11:41:25 +0800 Subject: mmc: sunxi: Fix misuse of gpio_direction_input() It does not make sense to make gpio_direction_input() return the gpio input status. The return value of gpio_direction_input() is inconsistent if CONFIG_DM_GPIO is defined. And we don't need to call gpio_direction_input() int sunxi_mmc_getcd(). Just init the gpio once in mmc_resource_init() is enough. Signed-off-by: Axel Lin Reviewed-by: Simon Glass Signed-off-by: Ian Campbell --- drivers/gpio/sunxi_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpio') diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c index 44135e5..2fa50f9 100644 --- a/drivers/gpio/sunxi_gpio.c +++ b/drivers/gpio/sunxi_gpio.c @@ -75,7 +75,7 @@ int gpio_direction_input(unsigned gpio) { sunxi_gpio_set_cfgpin(gpio, SUNXI_GPIO_INPUT); - return sunxi_gpio_input(gpio); + return 0; } int gpio_direction_output(unsigned gpio, int value) -- cgit v1.1