diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-10-24 13:37:34 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-25 14:20:20 +1000 |
commit | 5414c6be57dd02e089c3eba1f5134f441733d013 (patch) | |
tree | cba51e6f4cb80eade6ad107b757ce38d95c249a0 /arch | |
parent | a0f467261ae041864414103b8dd6fc4487a3c7de (diff) | |
download | linux-5414c6be57dd02e089c3eba1f5134f441733d013.tar.gz linux-5414c6be57dd02e089c3eba1f5134f441733d013.tar.bz2 linux-5414c6be57dd02e089c3eba1f5134f441733d013.zip |
[POWERPC] Make irq_dispose_mapping(NO_IRQ) a nop
It makes for a friendlier API if irq_dispose_mapping(NO_IRQ) is a
nop, rather than triggering a WARN_ON.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 67b21a008f6e..eb9fc621e057 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -648,10 +648,14 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map); void irq_dispose_mapping(unsigned int virq) { - struct irq_host *host = irq_map[virq].host; + struct irq_host *host; irq_hw_number_t hwirq; unsigned long flags; + if (virq == NO_IRQ) + return; + + host = irq_map[virq].host; WARN_ON (host == NULL); if (host == NULL) return; |