summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/act2000
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-10-06 15:04:35 -0400
committerJeff Garzik <jeff@garzik.org>2006-10-06 15:04:35 -0400
commitd87dbede030d17770aa6a6170e70ab6f8044e5ae (patch)
treee3d8920485750da042628fe0fe1369c3effbf73b /drivers/isdn/act2000
parent8f4aff6cb178b0a580ee206e7cca63e2d31f4a4e (diff)
downloadlinux-d87dbede030d17770aa6a6170e70ab6f8044e5ae.tar.bz2
drivers/isdn/act2000: kill irq2card_map
Eliminate irq->card lookup table, by properly passing the card pointer via request_irq() like other drivers. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/isdn/act2000')
-rw-r--r--drivers/isdn/act2000/act2000_isa.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/isdn/act2000/act2000_isa.c b/drivers/isdn/act2000/act2000_isa.c
index 3014495b7ff7..3cac23739344 100644
--- a/drivers/isdn/act2000/act2000_isa.c
+++ b/drivers/isdn/act2000/act2000_isa.c
@@ -16,8 +16,6 @@
#include "act2000_isa.h"
#include "capi.h"
-static act2000_card *irq2card_map[16];
-
/*
* Reset Controller, then try to read the Card's signature.
+ Return:
@@ -65,14 +63,9 @@ act2000_isa_detect(unsigned short portbase)
static irqreturn_t
act2000_isa_interrupt(int irq, void *dev_id)
{
- act2000_card *card = irq2card_map[irq];
+ act2000_card *card = dev_id;
u_char istatus;
- if (!card) {
- printk(KERN_WARNING
- "act2000: Spurious interrupt!\n");
- return IRQ_NONE;
- }
istatus = (inb(ISA_PORT_ISR) & 0x07);
if (istatus & ISA_ISR_OUT) {
/* RX fifo has data */
@@ -139,17 +132,15 @@ int
act2000_isa_config_irq(act2000_card * card, short irq)
{
if (card->flags & ACT2000_FLAGS_IVALID) {
- free_irq(card->irq, NULL);
- irq2card_map[card->irq] = NULL;
+ free_irq(card->irq, card);
}
card->flags &= ~ACT2000_FLAGS_IVALID;
outb(ISA_COR_IRQOFF, ISA_PORT_COR);
if (!irq)
return 0;
- if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, NULL)) {
+ if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, card)) {
card->irq = irq;
- irq2card_map[card->irq] = card;
card->flags |= ACT2000_FLAGS_IVALID;
printk(KERN_WARNING
"act2000: Could not request irq %d\n",irq);
@@ -188,10 +179,9 @@ act2000_isa_release(act2000_card * card)
unsigned long flags;
spin_lock_irqsave(&card->lock, flags);
- if (card->flags & ACT2000_FLAGS_IVALID) {
- free_irq(card->irq, NULL);
- irq2card_map[card->irq] = NULL;
- }
+ if (card->flags & ACT2000_FLAGS_IVALID)
+ free_irq(card->irq, card);
+
card->flags &= ~ACT2000_FLAGS_IVALID;
if (card->flags & ACT2000_FLAGS_PVALID)
release_region(card->port, ISA_REGION);