Skip to content

Commit

Permalink
ARM: sa1111: add sa1111_get_irq()
Browse files Browse the repository at this point in the history
Add a helper function to get the irq number for a device.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
  • Loading branch information
Russell King committed Sep 20, 2016
1 parent 1629c9a commit cf6e4ca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/arm/common/sa1111.c
Original file line number Diff line number Diff line change
Expand Up @@ -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."
*
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/include/asm/hardware/sa1111.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ struct sa1111_driver {
int sa1111_enable_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 *);

#define SA1111_AUDIO_ACLINK 0
Expand Down

0 comments on commit cf6e4ca

Please sign in to comment.