aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 11:20:48 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 11:20:48 -0500
commitae86afaee6a1c77c7a06d81dcc3bf872204d3bec (patch)
tree992b5b436de3033c23c3dc6cd7ded617a4603eed /drivers/ide/ide.c
parentbd53cbcce501b61921a1af2dddfa87c5b9923dfd (diff)
ide: use per-port IRQ handlers
Use hwif instead of hwgroup as {request,free}_irq()'s cookie, teach ide_intr() to return early for non-active serialized ports, modify unexpected_intr() accordingly and then use per-port IRQ handlers instead of per-hwgroup ones. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 46a2d4ca812b..5bc2e4782a55 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -175,10 +175,6 @@ EXPORT_SYMBOL_GPL(ide_port_unregister_devices);
175 175
176void ide_unregister(ide_hwif_t *hwif) 176void ide_unregister(ide_hwif_t *hwif)
177{ 177{
178 ide_hwif_t *g;
179 ide_hwgroup_t *hwgroup;
180 int irq_count = 0;
181
182 BUG_ON(in_interrupt()); 178 BUG_ON(in_interrupt());
183 BUG_ON(irqs_disabled()); 179 BUG_ON(irqs_disabled());
184 180
@@ -191,18 +187,7 @@ void ide_unregister(ide_hwif_t *hwif)
191 187
192 ide_proc_unregister_port(hwif); 188 ide_proc_unregister_port(hwif);
193 189
194 hwgroup = hwif->hwgroup; 190 free_irq(hwif->irq, hwif);
195 /*
196 * free the irq if we were the only hwif using it
197 */
198 g = hwgroup->hwif;
199 do {
200 if (g->irq == hwif->irq)
201 ++irq_count;
202 g = g->next;
203 } while (g != hwgroup->hwif);
204 if (irq_count == 1)
205 free_irq(hwif->irq, hwgroup);
206 191
207 ide_remove_port_from_hwgroup(hwif); 192 ide_remove_port_from_hwgroup(hwif);
208 193