Re: [PATCH v1 1/1] gpio: Remove unused and obsoleted irq_to_gpio()

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

 



CC greg

On Thu, Jan 12, 2023 at 2:39 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
irq_to_gpio() is legacy and unused API, remove it for good.

This leaves gpio_to_irq() as it's used yet in many places.
Nevertheless, removal of its counterpart is a good signal
to whoever even trying to consider using them that do not.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
 Documentation/driver-api/gpio/legacy.rst             |  8 --------
 .../translations/zh_CN/driver-api/gpio/legacy.rst    |  7 -------
 Documentation/translations/zh_TW/gpio.txt            |  7 -------
 arch/m68k/include/asm/gpio.h                         |  7 -------
 arch/sh/include/asm/gpio.h                           |  5 -----
 include/linux/gpio.h                                 | 12 ------------
 6 files changed, 46 deletions(-)

[...]

--- a/arch/m68k/include/asm/gpio.h
+++ b/arch/m68k/include/asm/gpio.h
@@ -66,13 +66,6 @@ static inline int gpio_to_irq(unsigned gpio)
                return __gpio_to_irq(gpio);
 }

-static inline int irq_to_gpio(unsigned irq)
-{
-       return (irq >= MCFGPIO_IRQ_VECBASE &&
-               irq < (MCFGPIO_IRQ_VECBASE + MCFGPIO_IRQ_MAX)) ?
-               irq - MCFGPIO_IRQ_VECBASE : -ENXIO;
-}
-
 static inline int gpio_cansleep(unsigned gpio)
 {
        return gpio < MCFGPIO_PIN_MAX ? 0 : __gpio_cansleep(gpio);

Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux