From: Holger Brunck Date: Sun, 21 Aug 2011 23:21:06 +0000 (+0000) Subject: kw_gpio: fix error in kw_gpio_direction_input X-Git-Tag: v2011.12-rc1~512^2~37 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e5afdf584c1e217b19579ba88e415ff8eb657fd8;p=u-boot kw_gpio: fix error in kw_gpio_direction_input The function kw_gpio_is_valid returns zero on success, so adapt the error check accordingly. Signed-off-by: Holger Brunck cc: Prafulla Wadaskar cc: Dieter Kiermaier --- diff --git a/drivers/gpio/kw_gpio.c b/drivers/gpio/kw_gpio.c index 56383c2875..2de179e827 100644 --- a/drivers/gpio/kw_gpio.c +++ b/drivers/gpio/kw_gpio.c @@ -109,7 +109,7 @@ void kw_gpio_set_valid(unsigned pin, int mode) */ int kw_gpio_direction_input(unsigned pin) { - if (!kw_gpio_is_valid(pin, GPIO_INPUT_OK)) + if (kw_gpio_is_valid(pin, GPIO_INPUT_OK) != 0) return 1; /* Configure GPIO direction. */