aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/irq/proc.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 2db91eb54ad8..ddde0ef9ccdc 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -66,12 +66,19 @@ static int name_unique(unsigned int irq, struct irqaction *new_action)
66{ 66{
67 struct irq_desc *desc = irq_desc + irq; 67 struct irq_desc *desc = irq_desc + irq;
68 struct irqaction *action; 68 struct irqaction *action;
69 unsigned long flags;
70 int ret = 1;
69 71
70 for (action = desc->action ; action; action = action->next) 72 spin_lock_irqsave(&desc->lock, flags);
73 for (action = desc->action ; action; action = action->next) {
71 if ((action != new_action) && action->name && 74 if ((action != new_action) && action->name &&
72 !strcmp(new_action->name, action->name)) 75 !strcmp(new_action->name, action->name)) {
73 return 0; 76 ret = 0;
74 return 1; 77 break;
78 }
79 }
80 spin_unlock_irqrestore(&desc->lock, flags);
81 return ret;
75} 82}
76 83
77void register_handler_proc(unsigned int irq, struct irqaction *action) 84void register_handler_proc(unsigned int irq, struct irqaction *action)