[PATCH] kernel/irq: Reset IRQ desc->depth to 1 when __free_irqdisables the line

From: Shmulik Ladkani
Date: Tue Jan 12 2010 - 02:42:49 EST


Reset irq_desc's depth field to 1, indicating IRQ line is disabled, when
__free_irq disables/shuts-down the line (i.e. upon unregistration of
last interrupt handler).

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@xxxxxxxxx>
---
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index eb6078c..642a98c 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -877,6 +877,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)

/* If this was the last handler, shut down the IRQ line: */
if (!desc->action) {
+ desc->depth = 1;
desc->status |= IRQ_DISABLED;
if (desc->chip->shutdown)
desc->chip->shutdown(irq);
--
Shmulik Ladkani
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/