diff mbox

[U-Boot,v2,4/4] imx: Return gpio_set_value in gpio_direction_output

Message ID 4F844316.4090206@gmail.com
State Awaiting Upstream
Headers show

Commit Message

Vikram Narayanan April 10, 2012, 2:26 p.m. UTC
Return gpio_set_value in gpio_direction_output.
Earlier it returned 0 and ignored gpio_set_value's return value.

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
---
 drivers/gpio/mxc_gpio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Stefano Babic April 10, 2012, 2:44 p.m. UTC | #1
On 10/04/2012 16:26, Vikram Narayanan wrote:
> Return gpio_set_value in gpio_direction_output.
> Earlier it returned 0 and ignored gpio_set_value's return value.
> 
> Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
> ---
>  drivers/gpio/mxc_gpio.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
> index 21b1cdc..f1b1c16 100644
> --- a/drivers/gpio/mxc_gpio.c
> +++ b/drivers/gpio/mxc_gpio.c
> @@ -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);
>  }

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic
Stefano Babic April 11, 2012, 7:33 a.m. UTC | #2
On 10/04/2012 16:26, Vikram Narayanan wrote:
> Return gpio_set_value in gpio_direction_output.
> Earlier it returned 0 and ignored gpio_set_value's return value.
> 
> Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
> ---

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

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index 21b1cdc..f1b1c16 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -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);
 }