mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
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>
This commit is contained in:
parent
0d2b0a8f45
commit
e5afdf584c
1 changed files with 1 additions and 1 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue