From: Thomas Gleixner Enable platforms to disable request_irq() for certain interrupts. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton --- include/linux/irq.h | 1 + kernel/irq/manage.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff -puN include/linux/irq.h~genirq-add-irq_norequest-support include/linux/irq.h --- devel/include/linux/irq.h~genirq-add-irq_norequest-support 2006-05-29 16:21:37.000000000 -0700 +++ devel-akpm/include/linux/irq.h 2006-05-29 16:46:31.000000000 -0700 @@ -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 * diff -puN kernel/irq/manage.c~genirq-add-irq_norequest-support kernel/irq/manage.c --- devel/kernel/irq/manage.c~genirq-add-irq_norequest-support 2006-05-29 16:21:37.000000000 -0700 +++ devel-akpm/kernel/irq/manage.c 2006-05-29 16:46:31.000000000 -0700 @@ -141,7 +141,7 @@ int can_request_irq(unsigned int irq, un { 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; _