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]

 



Dear Jonas Gorski,

On Sun, 13 Sep 2015 15:21:35 +0200, Jonas Gorski wrote:

> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
> index b396bf3..dba8997 100644
> --- a/drivers/gpio/gpio-mvebu.c
> +++ b/drivers/gpio/gpio-mvebu.c
> @@ -185,16 +185,6 @@ static void __iomem *mvebu_gpioreg_level_mask(struct mvebu_gpio_chip *mvchip)
>   * Functions implementing the gpio_chip methods
>   */
>  
> -static int mvebu_gpio_request(struct gpio_chip *chip, unsigned pin)
> -{
> -	return pinctrl_request_gpio(chip->base + pin);
> -}
> -
> -static void mvebu_gpio_free(struct gpio_chip *chip, unsigned pin)
> -{
> -	pinctrl_free_gpio(chip->base + pin);
> -}
> -
>  static void mvebu_gpio_set(struct gpio_chip *chip, unsigned pin, int value)
>  {
>  	struct mvebu_gpio_chip *mvchip =
> @@ -709,8 +699,8 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
>  	mvchip->soc_variant = soc_variant;
>  	mvchip->chip.label = dev_name(&pdev->dev);
>  	mvchip->chip.dev = &pdev->dev;
> -	mvchip->chip.request = mvebu_gpio_request;
> -	mvchip->chip.free = mvebu_gpio_free;
> +	mvchip->chip.request = gpiochip_generic_request;
> +	mvchip->chip.free = gpiochip_generic_free;
>  	mvchip->chip.direction_input = mvebu_gpio_direction_input;
>  	mvchip->chip.get = mvebu_gpio_get;
>  	mvchip->chip.direction_output = mvebu_gpio_direction_output;

For the mvebu part:

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx>

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
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