diff options
-rw-r--r-- | include/linux/irq.h | 1 | ||||
-rw-r--r-- | kernel/irq/manage.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index b2fcf330cf2e..1df49ec7f820 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #define IRQ_NOPROBE 512 /* IRQ is not valid for probing */ | 43 | #define IRQ_NOPROBE 512 /* IRQ is not valid for probing */ |
44 | #define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */ | ||
44 | /** | 45 | /** |
45 | * struct hw_interrupt_type - hardware interrupt type descriptor | 46 | * struct hw_interrupt_type - hardware interrupt type descriptor |
46 | * | 47 | * |
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 | ||