Re: [PATCH v1 04/13] gpio: dwapb: Deduplicate IRQ resource management

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

 



On Thu, Apr 09, 2020 at 05:12:19PM +0300, Andy Shevchenko wrote:
> GPIO library provides default IRQ resource management hooks,
> there is no need to repeat this in the individual driver.
> 
> Remove them for good.

Great catch. Thanks.

Reviewed-by: Serge Semin <fancer.lancer@xxxxxxxxx>

> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpio/gpio-dwapb.c | 27 ---------------------------
>  1 file changed, 27 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
> index 588d5c61ae42..c0c267cddd80 100644
> --- a/drivers/gpio/gpio-dwapb.c
> +++ b/drivers/gpio/gpio-dwapb.c
> @@ -250,31 +250,6 @@ static void dwapb_irq_disable(struct irq_data *d)
>  	spin_unlock_irqrestore(&gc->bgpio_lock, flags);
>  }
>  
> -static int dwapb_irq_reqres(struct irq_data *d)
> -{
> -	struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d);
> -	struct dwapb_gpio *gpio = igc->private;
> -	struct gpio_chip *gc = &gpio->ports[0].gc;
> -	int ret;
> -
> -	ret = gpiochip_lock_as_irq(gc, irqd_to_hwirq(d));
> -	if (ret) {
> -		dev_err(gpio->dev, "unable to lock HW IRQ %lu for IRQ\n",
> -			irqd_to_hwirq(d));
> -		return ret;
> -	}
> -	return 0;
> -}
> -
> -static void dwapb_irq_relres(struct irq_data *d)
> -{
> -	struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d);
> -	struct dwapb_gpio *gpio = igc->private;
> -	struct gpio_chip *gc = &gpio->ports[0].gc;
> -
> -	gpiochip_unlock_as_irq(gc, irqd_to_hwirq(d));
> -}
> -
>  static int dwapb_irq_set_type(struct irq_data *d, u32 type)
>  {
>  	struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d);
> @@ -428,8 +403,6 @@ static void dwapb_configure_irqs(struct dwapb_gpio *gpio,
>  		ct->chip.irq_set_type = dwapb_irq_set_type;
>  		ct->chip.irq_enable = dwapb_irq_enable;
>  		ct->chip.irq_disable = dwapb_irq_disable;
> -		ct->chip.irq_request_resources = dwapb_irq_reqres;
> -		ct->chip.irq_release_resources = dwapb_irq_relres;
>  #ifdef CONFIG_PM_SLEEP
>  		ct->chip.irq_set_wake = dwapb_irq_set_wake;
>  #endif
> -- 
> 2.25.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