Skip to contentSkip to conversation

imx: Return gpio_set_value in gpio_direction_output

PATCH New Vikram Narayanan 2 participants 3 messages Apr 10, 2012 – Apr 11, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 4/4 imx: Return gpio_set_value in gpio_direction_output

Return gpio_set_value in gpio_direction_output. Earlier it returned 0 and ignored gpio_set_value's return value.

---
 drivers/gpio/mxc_gpio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/gpio/mxc_gpio.c +1 -2
index 21b1cdc..f1b1c16 100644
@@ -145,6 +145,5 @@ int gpio_direction_output(unsigned gpio, int value)
 	if (ret < 0)
 		return ret;
 
-	gpio_set_value(gpio, value);
-	return 0;
+	return gpio_set_value(gpio, value);
 }
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v2 4/4 imx: Return gpio_set_value in gpio_direction_output

Quoted 13 lines · Vikram Narayanan

Return gpio_set_value in gpio_direction_output. Earlier it returned 0 and ignored gpio_set_value's return value.

---
 drivers/gpio/mxc_gpio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/gpio/mxc_gpio.c +0 -0
index 21b1cdc..f1b1c16 100644

drivers/gpio/mxc_gpio.c int gpio_direction_output(unsigned gpio, int value) · line 149

Quoted 7 lines
drivers/gpio/mxc_gpio.c +1 -2
@@ -145,6 +145,5 @@ int gpio_direction_output(unsigned gpio, int value)
 	if (ret < 0)
 		return ret;
 
-	gpio_set_value(gpio, value);
-	return 0;
+	return gpio_set_value(gpio, value);
 }

Best regards,
Stefano Babic

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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#2 lore raw

PATCH v2 4/4 imx: Return gpio_set_value in gpio_direction_output

In reply to Vikram Narayanan
Quoted 5 lines · Vikram Narayanan

Return gpio_set_value in gpio_direction_output. Earlier it returned 0 and ignored gpio_set_value's return value.

---

Applied to u-boot-imx (fix), thanks.

Best regards,
Stefano Babic

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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================