aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq/proc.c')
-rw-r--r--kernel/irq/proc.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 4e1b94726818..feaa813b84a9 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -96,7 +96,7 @@ static ssize_t write_irq_affinity(int type, struct file *file,
96 cpumask_var_t new_value; 96 cpumask_var_t new_value;
97 int err; 97 int err;
98 98
99 if (!irq_can_set_affinity(irq) || no_irq_affinity) 99 if (!irq_can_set_affinity_usr(irq) || no_irq_affinity)
100 return -EIO; 100 return -EIO;
101 101
102 if (!alloc_cpumask_var(&new_value, GFP_KERNEL)) 102 if (!alloc_cpumask_var(&new_value, GFP_KERNEL))
@@ -311,7 +311,6 @@ void register_handler_proc(unsigned int irq, struct irqaction *action)
311 !name_unique(irq, action)) 311 !name_unique(irq, action))
312 return; 312 return;
313 313
314 memset(name, 0, MAX_NAMELEN);
315 snprintf(name, MAX_NAMELEN, "%s", action->name); 314 snprintf(name, MAX_NAMELEN, "%s", action->name);
316 315
317 /* create /proc/irq/1234/handler/ */ 316 /* create /proc/irq/1234/handler/ */
@@ -340,7 +339,6 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc)
340 if (desc->dir) 339 if (desc->dir)
341 goto out_unlock; 340 goto out_unlock;
342 341
343 memset(name, 0, MAX_NAMELEN);
344 sprintf(name, "%d", irq); 342 sprintf(name, "%d", irq);
345 343
346 /* create /proc/irq/1234 */ 344 /* create /proc/irq/1234 */
@@ -386,7 +384,6 @@ void unregister_irq_proc(unsigned int irq, struct irq_desc *desc)
386#endif 384#endif
387 remove_proc_entry("spurious", desc->dir); 385 remove_proc_entry("spurious", desc->dir);
388 386
389 memset(name, 0, MAX_NAMELEN);
390 sprintf(name, "%u", irq); 387 sprintf(name, "%u", irq);
391 remove_proc_entry(name, root_irq_dir); 388 remove_proc_entry(name, root_irq_dir);
392} 389}
@@ -421,12 +418,8 @@ void init_irq_proc(void)
421 /* 418 /*
422 * Create entries for all existing IRQs. 419 * Create entries for all existing IRQs.
423 */ 420 */
424 for_each_irq_desc(irq, desc) { 421 for_each_irq_desc(irq, desc)
425 if (!desc)
426 continue;
427
428 register_irq_proc(irq, desc); 422 register_irq_proc(irq, desc);
429 }
430} 423}
431 424
432#ifdef CONFIG_GENERIC_IRQ_SHOW 425#ifdef CONFIG_GENERIC_IRQ_SHOW