summaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2016-09-06 01:45:33 +0200
committerRussell King <rmk+kernel@armlinux.org.uk>2016-09-20 15:21:08 +0200
commitcf6e4ca3e53f734f8fcb253a686c1fdbb6a50e85 (patch)
tree1ce704529fd40fbeeecbb588e0f4f5875e421560 /arch/arm/common
parentARM: sa1111: clean up duplication in IRQ chip implementation (diff)
downloadlinux-cf6e4ca3e53f734f8fcb253a686c1fdbb6a50e85.tar.xz
linux-cf6e4ca3e53f734f8fcb253a686c1fdbb6a50e85.zip
ARM: sa1111: add sa1111_get_irq()
Add a helper function to get the irq number for a device. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/sa1111.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 7f232ce50944..3c722a4143fe 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -1357,6 +1357,14 @@ void sa1111_disable_device(struct sa1111_dev *sadev)
}
EXPORT_SYMBOL(sa1111_disable_device);
+int sa1111_get_irq(struct sa1111_dev *sadev, unsigned num)
+{
+ if (num >= ARRAY_SIZE(sadev->irq))
+ return -EINVAL;
+ return sadev->irq[num];
+}
+EXPORT_SYMBOL_GPL(sa1111_get_irq);
+
/*
* SA1111 "Register Access Bus."
*