From ae86afaee6a1c77c7a06d81dcc3bf872204d3bec Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Tue, 6 Jan 2009 17:20:48 +0100 Subject: 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 --- drivers/ide/ide.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'drivers/ide/ide.c') 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); void ide_unregister(ide_hwif_t *hwif) { - ide_hwif_t *g; - ide_hwgroup_t *hwgroup; - int irq_count = 0; - BUG_ON(in_interrupt()); BUG_ON(irqs_disabled()); @@ -191,18 +187,7 @@ void ide_unregister(ide_hwif_t *hwif) ide_proc_unregister_port(hwif); - hwgroup = hwif->hwgroup; - /* - * free the irq if we were the only hwif using it - */ - g = hwgroup->hwif; - do { - if (g->irq == hwif->irq) - ++irq_count; - g = g->next; - } while (g != hwgroup->hwif); - if (irq_count == 1) - free_irq(hwif->irq, hwgroup); + free_irq(hwif->irq, hwif); ide_remove_port_from_hwgroup(hwif); -- cgit v1.2.3