summaryrefslogtreecommitdiffstats
path: root/kernel/irq/chip.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-02-27 11:07:10 -0800
committerChristoph Lameter <clameter@sgi.com>2008-02-27 11:07:10 -0800
commit9ef64cb4320df821638b508f79aa8b858cca99f0 (patch)
tree4efbf0854234f89c6f4413077ec795fc669b5b0a /kernel/irq/chip.c
parent6f157c1d268d5888ca44c589dccd01729c4172f6 (diff)
parent7704a8b6fc4a8f51599eb2af4dcf1e2ac9c7e576 (diff)
downloadkernel-crypto-9ef64cb4320df821638b508f79aa8b858cca99f0.tar.gz
kernel-crypto-9ef64cb4320df821638b508f79aa8b858cca99f0.tar.xz
kernel-crypto-9ef64cb4320df821638b508f79aa8b858cca99f0.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r--kernel/irq/chip.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index cc54c627635..fdb3fbe2b0c 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -246,6 +246,17 @@ static unsigned int default_startup(unsigned int irq)
}
/*
+ * default shutdown function
+ */
+static void default_shutdown(unsigned int irq)
+{
+ struct irq_desc *desc = irq_desc + irq;
+
+ desc->chip->mask(irq);
+ desc->status |= IRQ_MASKED;
+}
+
+/*
* Fixup enable/disable function pointers
*/
void irq_chip_set_defaults(struct irq_chip *chip)
@@ -256,8 +267,15 @@ void irq_chip_set_defaults(struct irq_chip *chip)
chip->disable = default_disable;
if (!chip->startup)
chip->startup = default_startup;
+ /*
+ * We use chip->disable, when the user provided its own. When
+ * we have default_disable set for chip->disable, then we need
+ * to use default_shutdown, otherwise the irq line is not
+ * disabled on free_irq():
+ */
if (!chip->shutdown)
- chip->shutdown = chip->disable;
+ chip->shutdown = chip->disable != default_disable ?
+ chip->disable : default_shutdown;
if (!chip->name)
chip->name = chip->typename;
if (!chip->end)