[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>
This commit is contained in:
Thomas Gleixner 2006-06-29 02:24:49 -07:00 committed by Linus Torvalds
parent 3418d72404
commit 6550c775cb
2 changed files with 4 additions and 1 deletions

View file

@ -41,6 +41,7 @@
#endif
#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */
#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */
/**
* struct hw_interrupt_type - hardware interrupt type descriptor
*

View file

@ -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;