Re: [PATCH RFT 2/5] gpio: replace trivial implementations of request/free with generic one

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

 



Hi Jonas,

On 13 September 2015 at 15:21, Jonas Gorski <jogo@xxxxxxxxxxx> wrote:
> Replace all trivial request/free callbacks that do nothing but call into
> pinctrl code with the generic versions.
>
> Signed-off-by: Jonas Gorski <jogo@xxxxxxxxxxx>
> ---
>  drivers/gpio/gpio-lpc18xx.c    | 14 ++------------
>  drivers/gpio/gpio-moxart.c     | 14 ++------------
>  drivers/gpio/gpio-mvebu.c      | 14 ++------------
>  drivers/gpio/gpio-tb10x.c      | 14 ++------------
>  drivers/gpio/gpio-tz1090-pdc.c | 14 ++------------
>  drivers/gpio/gpio-vf610.c      | 14 ++------------
>  6 files changed, 12 insertions(+), 72 deletions(-)
>
> diff --git a/drivers/gpio/gpio-lpc18xx.c b/drivers/gpio/gpio-lpc18xx.c
> index eb68603..e39dcb0 100644
> --- a/drivers/gpio/gpio-lpc18xx.c
> +++ b/drivers/gpio/gpio-lpc18xx.c
> @@ -36,16 +36,6 @@ static inline struct lpc18xx_gpio_chip *to_lpc18xx_gpio(struct gpio_chip *chip)
>         return container_of(chip, struct lpc18xx_gpio_chip, gpio);
>  }
>
> -static int lpc18xx_gpio_request(struct gpio_chip *chip, unsigned offset)
> -{
> -       return pinctrl_request_gpio(offset);
> -}
> -
> -static void lpc18xx_gpio_free(struct gpio_chip *chip, unsigned offset)
> -{
> -       pinctrl_free_gpio(offset);
> -}
> -
>  static void lpc18xx_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
>  {
>         struct lpc18xx_gpio_chip *gc = to_lpc18xx_gpio(chip);
> @@ -95,8 +85,8 @@ static int lpc18xx_gpio_direction_output(struct gpio_chip *chip,
>
>  static struct gpio_chip lpc18xx_chip = {
>         .label                  = "lpc18xx/43xx-gpio",
> -       .request                = lpc18xx_gpio_request,
> -       .free                   = lpc18xx_gpio_free,
> +       .request                = gpiochip_generic_request,
> +       .free                   = gpiochip_generic_free,
>         .direction_input        = lpc18xx_gpio_direction_input,
>         .direction_output       = lpc18xx_gpio_direction_output,
>         .set                    = lpc18xx_gpio_set,

For lpc18xx part:
Acked-by: Joachim Eastwood <manabian@xxxxxxxxx>

regards,
Joachim Eastwood
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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