Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40901
b: refs/heads/master
c: 8b126b7
h: refs/heads/master
i:
  40899: 674d0b3
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Nov 14, 2006
1 parent b1dafe2 commit 12f784c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0579e303553655245e8a6616bd8b4428b07d63a2
refs/heads/master: 8b126b77536186eef69d408eb7959ce7f558f251
9 changes: 7 additions & 2 deletions trunk/kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
{
struct irq_desc *desc = irq_desc + irq;
struct irqaction *old, **p;
const char *old_name = NULL;
unsigned long flags;
int shared = 0;

Expand Down Expand Up @@ -255,8 +256,10 @@ int setup_irq(unsigned int irq, struct irqaction *new)
* set the trigger type must match.
*/
if (!((old->flags & new->flags) & IRQF_SHARED) ||
((old->flags ^ new->flags) & IRQF_TRIGGER_MASK))
((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) {
old_name = old->name;
goto mismatch;
}

#if defined(CONFIG_IRQ_PER_CPU)
/* All handlers must agree on per-cpuness */
Expand Down Expand Up @@ -322,11 +325,13 @@ int setup_irq(unsigned int irq, struct irqaction *new)
return 0;

mismatch:
spin_unlock_irqrestore(&desc->lock, flags);
if (!(new->flags & IRQF_PROBE_SHARED)) {
printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq);
if (old_name)
printk(KERN_ERR "current handler: %s\n", old_name);
dump_stack();
}
spin_unlock_irqrestore(&desc->lock, flags);
return -EBUSY;
}

Expand Down

0 comments on commit 12f784c

Please sign in to comment.