Re: [PATCH v2 1/2] gpio: altera-a10sr: Set proper output level for direction_output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



czw., 17 sty 2019 o 13:40 Axel Lin <axel.lin@xxxxxxxxxx> napisał(a):
>
> The altr_a10sr_gpio_direction_output should set proper output level
> based on the value argument.
>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>

Please add a Fixes: and Cc stable tags here. Take a look at recent
commits from linux-stable for reference.

Bart

> ---
> v2: Based on Bartosz's comment to split the patch.
>     1/2 is bug fix
>     2/2 is coding style fix and fix checkpatch warning
>  drivers/gpio/gpio-altera-a10sr.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-altera-a10sr.c b/drivers/gpio/gpio-altera-a10sr.c
> index 6b11f1314248..7f9e0304b510 100644
> --- a/drivers/gpio/gpio-altera-a10sr.c
> +++ b/drivers/gpio/gpio-altera-a10sr.c
> @@ -66,8 +66,10 @@ static int altr_a10sr_gpio_direction_input(struct gpio_chip *gc,
>  static int altr_a10sr_gpio_direction_output(struct gpio_chip *gc,
>                                             unsigned int nr, int value)
>  {
> -       if (nr <= (ALTR_A10SR_OUT_VALID_RANGE_HI - ALTR_A10SR_LED_VALID_SHIFT))
> +       if (nr <= (ALTR_A10SR_OUT_VALID_RANGE_HI - ALTR_A10SR_LED_VALID_SHIFT)) {
> +               altr_a10sr_gpio_set(gc, nr, value);
>                 return 0;
> +       }
>         return -EINVAL;
>  }
>
> --
> 2.17.1
>




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux