From 35b180ee18aa558f346d8c9b9d99f7cef19979d2 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 23 Feb 2011 23:52:16 +0000 Subject: [PATCH] --- yaml --- r: 234769 b: refs/heads/master c: 9d591edd02a245305b1b9379e4c5571bad4d2774 h: refs/heads/master i: 234767: b11eeae684638fba91856cf157eb5a4eddd360c0 v: v3 --- [refs] | 2 +- trunk/kernel/irq/manage.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index cf6228af46ed..b29decef4a97 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b5faba21a6805c33b40e258d36f57997ee1de131 +refs/heads/master: 9d591edd02a245305b1b9379e4c5571bad4d2774 diff --git a/trunk/kernel/irq/manage.c b/trunk/kernel/irq/manage.c index 2301de19ac7d..58c861367300 100644 --- a/trunk/kernel/irq/manage.c +++ b/trunk/kernel/irq/manage.c @@ -824,10 +824,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) rand_initialize_irq(irq); } - /* Oneshot interrupts are not allowed with shared */ - if ((new->flags & IRQF_ONESHOT) && (new->flags & IRQF_SHARED)) - return -EINVAL; - /* * Check whether the interrupt nests into another interrupt * thread. @@ -881,10 +877,12 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) * Can't share interrupts unless both agree to and are * the same type (level, edge, polarity). So both flag * fields must have IRQF_SHARED set and the bits which - * set the trigger type must match. + * set the trigger type must match. Also all must + * agree on ONESHOT. */ if (!((old->flags & new->flags) & IRQF_SHARED) || - ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) { + ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK) || + ((old->flags ^ new->flags) & IRQF_ONESHOT)) { old_name = old->name; goto mismatch; }