[U-Boot] [PATCH] mmc: sunxi: Fix misuse of gpio_direction_input()

Simon Glass sjg at chromium.org
Sun Dec 21 19:53:28 CET 2014


On 19 December 2014 at 20:41, Axel Lin <axel.lin at ingics.com> wrote:
> 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 <axel.lin at ingics.com>
> ---
> Only compile tested, so please test this patch.
> Thanks.
>  drivers/gpio/sunxi_gpio.c | 2 +-
>  drivers/mmc/sunxi_mmc.c   | 7 +++++--
>  2 files changed, 6 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list