diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2006-06-29 05:24:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 13:26:24 -0400 |
commit | 6550c775cb5ee94c132d93d84de3bb23f0abf37b (patch) | |
tree | 818ae46cfe30265bbecc095262de53e9c8dcb012 /kernel | |
parent | 3418d72404e35eb19e7995cbf3e7a76ba8fefbce (diff) |
[PATCH] genirq: add IRQ_NOREQUEST support
Enable platforms to disable request_irq() for certain interrupts.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/manage.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 90a944a7fadc..cae900a849c4 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -141,7 +141,7 @@ int can_request_irq(unsigned int irq, unsigned long irqflags) | |||
141 | { | 141 | { |
142 | struct irqaction *action; | 142 | struct irqaction *action; |
143 | 143 | ||
144 | if (irq >= NR_IRQS) | 144 | if (irq >= NR_IRQS || irq_desc[irq].status & IRQ_NOREQUEST) |
145 | return 0; | 145 | return 0; |
146 | 146 | ||
147 | action = irq_desc[irq].action; | 147 | action = irq_desc[irq].action; |
@@ -356,6 +356,8 @@ int request_irq(unsigned int irq, | |||
356 | return -EINVAL; | 356 | return -EINVAL; |
357 | if (irq >= NR_IRQS) | 357 | if (irq >= NR_IRQS) |
358 | return -EINVAL; | 358 | return -EINVAL; |
359 | if (irq_desc[irq].status & IRQ_NOREQUEST) | ||
360 | return -EINVAL; | ||
359 | if (!handler) | 361 | if (!handler) |
360 | return -EINVAL; | 362 | return -EINVAL; |
361 | 363 | ||