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]

 



On 2015-09-13 06:21, Jonas Gorski 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(-)
<snip>
> diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
> index 3d5714d..cf39fb2 100644
> --- a/drivers/gpio/gpio-vf610.c
> +++ b/drivers/gpio/gpio-vf610.c
> @@ -77,16 +77,6 @@ static inline u32 vf610_gpio_readl(void __iomem *reg)
>  	return readl_relaxed(reg);
>  }
>  
> -static int vf610_gpio_request(struct gpio_chip *chip, unsigned offset)
> -{
> -	return pinctrl_request_gpio(chip->base + offset);
> -}
> -
> -static void vf610_gpio_free(struct gpio_chip *chip, unsigned offset)
> -{
> -	pinctrl_free_gpio(chip->base + offset);
> -}
> -
>  static int vf610_gpio_get(struct gpio_chip *gc, unsigned int gpio)
>  {
>  	struct vf610_gpio_port *port =
> @@ -255,8 +245,8 @@ static int vf610_gpio_probe(struct platform_device *pdev)
>  	gc->ngpio = VF610_GPIO_PER_PORT;
>  	gc->base = of_alias_get_id(np, "gpio") * VF610_GPIO_PER_PORT;
>  
> -	gc->request = vf610_gpio_request;
> -	gc->free = vf610_gpio_free;
> +	gc->request = gpiochip_generic_request;
> +	gc->free = gpiochip_generic_free;
>  	gc->direction_input = vf610_gpio_direction_input;
>  	gc->get = vf610_gpio_get;
>  	gc->direction_output = vf610_gpio_direction_output;

For the vf610 changes,
Acked-by: Stefan Agner <stefan@xxxxxxxx>

--
Stefan
--
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