linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] m68k: Fall back to __gpio_to_irq() for non-arch GPIOs
@ 2011-10-26  7:51 Mark Brown
  2011-10-27  4:19 ` Greg Ungerer
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-10-26  7:51 UTC (permalink / raw)
  To: Geert Uytterhoeven, Lucas De Marchi; +Cc: linux-m68k, linux-kernel, Mark Brown

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>
---
 arch/m68k/include/asm/gpio.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/m68k/include/asm/gpio.h b/arch/m68k/include/asm/gpio.h
index b204683..00d0071 100644
--- a/arch/m68k/include/asm/gpio.h
+++ b/arch/m68k/include/asm/gpio.h
@@ -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)
-- 
1.7.6.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-27  4:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26  7:51 [PATCH] m68k: Fall back to __gpio_to_irq() for non-arch GPIOs Mark Brown
2011-10-27  4:19 ` Greg Ungerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).