|
16 | 16 | #include "act2000_isa.h" |
17 | 17 | #include "capi.h" |
18 | 18 |
|
19 | | -static act2000_card *irq2card_map[16]; |
20 | | - |
21 | 19 | /* |
22 | 20 | * Reset Controller, then try to read the Card's signature. |
23 | 21 | + Return: |
@@ -65,14 +63,9 @@ act2000_isa_detect(unsigned short portbase) |
65 | 63 | static irqreturn_t |
66 | 64 | act2000_isa_interrupt(int irq, void *dev_id) |
67 | 65 | { |
68 | | - act2000_card *card = irq2card_map[irq]; |
| 66 | + act2000_card *card = dev_id; |
69 | 67 | u_char istatus; |
70 | 68 |
|
71 | | - if (!card) { |
72 | | - printk(KERN_WARNING |
73 | | - "act2000: Spurious interrupt!\n"); |
74 | | - return IRQ_NONE; |
75 | | - } |
76 | 69 | istatus = (inb(ISA_PORT_ISR) & 0x07); |
77 | 70 | if (istatus & ISA_ISR_OUT) { |
78 | 71 | /* RX fifo has data */ |
@@ -139,17 +132,15 @@ int |
139 | 132 | act2000_isa_config_irq(act2000_card * card, short irq) |
140 | 133 | { |
141 | 134 | if (card->flags & ACT2000_FLAGS_IVALID) { |
142 | | - free_irq(card->irq, NULL); |
143 | | - irq2card_map[card->irq] = NULL; |
| 135 | + free_irq(card->irq, card); |
144 | 136 | } |
145 | 137 | card->flags &= ~ACT2000_FLAGS_IVALID; |
146 | 138 | outb(ISA_COR_IRQOFF, ISA_PORT_COR); |
147 | 139 | if (!irq) |
148 | 140 | return 0; |
149 | 141 |
|
150 | | - if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, NULL)) { |
| 142 | + if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, card)) { |
151 | 143 | card->irq = irq; |
152 | | - irq2card_map[card->irq] = card; |
153 | 144 | card->flags |= ACT2000_FLAGS_IVALID; |
154 | 145 | printk(KERN_WARNING |
155 | 146 | "act2000: Could not request irq %d\n",irq); |
@@ -188,10 +179,9 @@ act2000_isa_release(act2000_card * card) |
188 | 179 | unsigned long flags; |
189 | 180 |
|
190 | 181 | spin_lock_irqsave(&card->lock, flags); |
191 | | - if (card->flags & ACT2000_FLAGS_IVALID) { |
192 | | - free_irq(card->irq, NULL); |
193 | | - irq2card_map[card->irq] = NULL; |
194 | | - } |
| 182 | + if (card->flags & ACT2000_FLAGS_IVALID) |
| 183 | + free_irq(card->irq, card); |
| 184 | + |
195 | 185 | card->flags &= ~ACT2000_FLAGS_IVALID; |
196 | 186 | if (card->flags & ACT2000_FLAGS_PVALID) |
197 | 187 | release_region(card->port, ISA_REGION); |
|
0 commit comments