summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorHolger Brunck <holger.brunck@keymile.com>2011-08-21 23:21:06 +0000
committerWolfgang Denk <wd@denx.de>2011-10-17 22:25:33 +0200
commite5afdf584c1e217b19579ba88e415ff8eb657fd8 (patch)
treecd51f3aaf39363c811998a8a4f894b75c5b33c75 /drivers/gpio
parent0d2b0a8f451a31e8d84e3d4866e78951ad6535f2 (diff)
downloadu-boot-e5afdf584c1e217b19579ba88e415ff8eb657fd8.tar.gz
u-boot-e5afdf584c1e217b19579ba88e415ff8eb657fd8.tar.xz
u-boot-e5afdf584c1e217b19579ba88e415ff8eb657fd8.zip
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 <holger.brunck@keymile.com> cc: Prafulla Wadaskar <prafulla@marvell.com> cc: Dieter Kiermaier <dk-arm-linux@gmx.de>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/kw_gpio.c2
1 files changed, 1 insertions, 1 deletions
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. */