summaryrefslogtreecommitdiffstats
path: root/kernel/irq/manage.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2006-06-29 11:24:49 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 19:26:24 +0200
commit6550c775cb5ee94c132d93d84de3bb23f0abf37b (patch)
tree818ae46cfe30265bbecc095262de53e9c8dcb012 /kernel/irq/manage.c
parent[PATCH] genirq: add IRQ_NOPROBE support (diff)
downloadlinux-6550c775cb5ee94c132d93d84de3bb23f0abf37b.tar.xz
linux-6550c775cb5ee94c132d93d84de3bb23f0abf37b.zip
[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/irq/manage.c')
-rw-r--r--kernel/irq/manage.c4
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)
{
struct irqaction *action;
- if (irq >= NR_IRQS)
+ if (irq >= NR_IRQS || irq_desc[irq].status & IRQ_NOREQUEST)
return 0;
action = irq_desc[irq].action;
@@ -356,6 +356,8 @@ int request_irq(unsigned int irq,
return -EINVAL;
if (irq >= NR_IRQS)
return -EINVAL;
+ if (irq_desc[irq].status & IRQ_NOREQUEST)
+ return -EINVAL;
if (!handler)
return -EINVAL;