summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-rpc
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-03-01 17:54:11 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-03-24 09:37:36 +0000
commitc402c110721ed53916595473aed1013acde95bab (patch)
treec337a6340b76f800151b378a2c0126f22331cd4e /arch/arm/mach-rpc
parent6e747b4b83c2290b465aabd1ac006332430e2b2e (diff)
downloadlinux-stable-c402c110721ed53916595473aed1013acde95bab.tar.gz
linux-stable-c402c110721ed53916595473aed1013acde95bab.tar.bz2
linux-stable-c402c110721ed53916595473aed1013acde95bab.zip
ARM: riscpc: use irq chip data in ecard.c
Use irq chip data to store the expansion card data pointer, rather than converting from the interrupt number to a slot number. This allows the interrupt chip methods to avoid knowing about interrupt numbering. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-rpc')
-rw-r--r--arch/arm/mach-rpc/ecard.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
index 4dd0edab6a65..ec84cfde4ad7 100644
--- a/arch/arm/mach-rpc/ecard.c
+++ b/arch/arm/mach-rpc/ecard.c
@@ -445,7 +445,7 @@ static expansioncard_ops_t ecard_default_ops = {
*/
static void ecard_irq_unmask(struct irq_data *d)
{
- ecard_t *ec = slot_to_ecard(d->irq - 32);
+ ecard_t *ec = irq_data_get_irq_chip_data(d);
if (ec) {
if (!ec->ops)
@@ -461,7 +461,7 @@ static void ecard_irq_unmask(struct irq_data *d)
static void ecard_irq_mask(struct irq_data *d)
{
- ecard_t *ec = slot_to_ecard(d->irq - 32);
+ ecard_t *ec = irq_data_get_irq_chip_data(d);
if (ec) {
if (!ec->ops)
@@ -1039,6 +1039,7 @@ ecard_probe(int slot, card_type_t type)
ec->irq = 32 + slot;
irq_set_chip_and_handler(ec->irq, &ecard_chip,
handle_level_irq);
+ irq_set_chip_data(ec->irq, ec);
set_irq_flags(ec->irq, IRQF_VALID);
}