Skip to contentSkip to conversation

kw_gpio: fix error in kw_gpio_direction_input

PATCH New Holger Brunck 2 participants 2 messages Aug 22, 2011 – Oct 17, 2011 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

cc Prafulla Wadaskar <[email protected]>
cc Dieter Kiermaier <[email protected]>
---
 drivers/gpio/kw_gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpio/kw_gpio.c +1 -1
index 56383c2..2de179e 100644
@@ -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. */
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 kw_gpio: fix error in kw_gpio_direction_input

Dear Holger Brunck,

Quoted 9 lines · In message <[email protected]> you…

The function kw_gpio_is_valid returns zero on success, so adapt the error check accordingly.

cc Prafulla Wadaskar <[email protected]>
cc Dieter Kiermaier <[email protected]>
---
 drivers/gpio/kw_gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The price of curiosity is a terminal experience.
                         - Terry Pratchett, _The Dark Side of the Sun_