Skip to content

Commit

Permalink
m68k: Fall back to __gpio_to_irq() for non-arch GPIOs
Browse files Browse the repository at this point in the history
gpiolib provides __gpio_to_irq() to map gpiolib gpios to interrupts - hook
that up on m68k.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
  • Loading branch information
Mark Brown authored and Greg Ungerer committed Dec 24, 2011
1 parent a2a3dfb commit d85b409
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/m68k/include/asm/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ static inline void gpio_set_value(unsigned gpio, int value)

static inline int gpio_to_irq(unsigned gpio)
{
return (gpio < MCFGPIO_IRQ_MAX) ? gpio + MCFGPIO_IRQ_VECBASE : -EINVAL;
return (gpio < MCFGPIO_IRQ_MAX) ? gpio + MCFGPIO_IRQ_VECBASE
: __gpio_to_irq(gpio);
}

static inline int irq_to_gpio(unsigned irq)
Expand Down

0 comments on commit d85b409

Please sign in to comment.