# \[PATCH 1/4\] gpio: remove broken irq\_to\_gpio() interface

- From: Lars-Peter Clausen \<lars@metafoo.de\>
- Date: 2016-02-15 16:01:27 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2016/02/4685766
- Thread: https://ratatoskr.run/linux-arm-kernel/2016/02/4685755/t.md

```text
On 02/15/2016 04:46 PM, Arnd Bergmann wrote:
> +static inline __deprecated int irq_to_gpio(unsigned int irq)
> +{
> +	/* this has clearly not worked for a long time */
> +	return -EINVAL;
> +}
> +
>  #define IRQ_TO_BIT(irq) BIT(irq_to_gpio(irq) & 0x1f)

The issue seems to be a fallout from commit 832f5dacfa0b ("MIPS: Remove all
the uses of custom gpio.h").

The irq_to_gpio() should be replaced with "(irq - JZ4740_IRQ_GPIO(0))".

- Lars
```
