diff options
Diffstat (limited to 'kernel/irq/proc.c')
| -rw-r--r-- | kernel/irq/proc.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index a9e5dc5f697..8069725ce90 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -12,7 +12,6 @@ #include <linux/seq_file.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> -#include <linux/mutex.h> #include "internals.h" @@ -349,29 +348,18 @@ void register_handler_proc(unsigned int irq, struct irqaction *action) void register_irq_proc(unsigned int irq, struct irq_desc *desc) { - static DEFINE_MUTEX(register_lock); char name [MAX_NAMELEN]; - if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip)) + if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip) || desc->dir) return; - /* - * irq directories are registered only when a handler is - * added, not when the descriptor is created, so multiple - * tasks might try to register at the same time. - */ - mutex_lock(®ister_lock); - - if (desc->dir) - goto out_unlock; - memset(name, 0, MAX_NAMELEN); sprintf(name, "%d", irq); /* create /proc/irq/1234 */ desc->dir = proc_mkdir(name, root_irq_dir); if (!desc->dir) - goto out_unlock; + return; #ifdef CONFIG_SMP /* create /proc/irq/<irq>/smp_affinity */ @@ -396,9 +384,6 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc) &irq_disable_depth_proc_fops, (void *)(long)irq); proc_create_data("wake_depth", 0444, desc->dir, &irq_wake_depth_proc_fops, (void *)(long)irq); - -out_unlock: - mutex_unlock(®ister_lock); } void unregister_irq_proc(unsigned int irq, struct irq_desc *desc) |
