Commit cf6e4ca3 authored by Russell King's avatar Russell King

ARM: sa1111: add sa1111_get_irq()

Add a helper function to get the irq number for a device.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent 1629c9ab
...@@ -1357,6 +1357,14 @@ void sa1111_disable_device(struct sa1111_dev *sadev) ...@@ -1357,6 +1357,14 @@ void sa1111_disable_device(struct sa1111_dev *sadev)
} }
EXPORT_SYMBOL(sa1111_disable_device); 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." * SA1111 "Register Access Bus."
* *
......
...@@ -446,6 +446,8 @@ struct sa1111_driver { ...@@ -446,6 +446,8 @@ struct sa1111_driver {
int sa1111_enable_device(struct sa1111_dev *); int sa1111_enable_device(struct sa1111_dev *);
void sa1111_disable_device(struct sa1111_dev *); void sa1111_disable_device(struct sa1111_dev *);
int sa1111_get_irq(struct sa1111_dev *, unsigned num);
unsigned int sa1111_pll_clock(struct sa1111_dev *); unsigned int sa1111_pll_clock(struct sa1111_dev *);
#define SA1111_AUDIO_ACLINK 0 #define SA1111_AUDIO_ACLINK 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment