]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] genirq: add IRQ_NOREQUEST support
authorThomas Gleixner <tglx@linutronix.de>
Thu, 29 Jun 2006 09:24:49 +0000 (02:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 29 Jun 2006 17:26:24 +0000 (10:26 -0700)
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>
include/linux/irq.h
kernel/irq/manage.c

index b2fcf330cf2e047ba9536f9e88aace37c793c5dd..1df49ec7f8204b55912c703e224c7b3d31f623f8 100644 (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
  *
index 90a944a7fadcff28782e9199eb81439222f17cdf..cae900a849c43867f3f3bb211e7c167a9baa1b45 100644 (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;