aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r--kernel/irq/chip.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 11c99697acfe..2d0dc3efe813 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -499,7 +499,8 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
499#endif /* CONFIG_SMP */ 499#endif /* CONFIG_SMP */
500 500
501void 501void
502__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained) 502__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
503 const char *name)
503{ 504{
504 struct irq_desc *desc; 505 struct irq_desc *desc;
505 unsigned long flags; 506 unsigned long flags;
@@ -540,6 +541,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained)
540 desc->depth = 1; 541 desc->depth = 1;
541 } 542 }
542 desc->handle_irq = handle; 543 desc->handle_irq = handle;
544 desc->name = name;
543 545
544 if (handle != handle_bad_irq && is_chained) { 546 if (handle != handle_bad_irq && is_chained) {
545 desc->status &= ~IRQ_DISABLED; 547 desc->status &= ~IRQ_DISABLED;
@@ -555,30 +557,13 @@ set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
555 irq_flow_handler_t handle) 557 irq_flow_handler_t handle)
556{ 558{
557 set_irq_chip(irq, chip); 559 set_irq_chip(irq, chip);
558 __set_irq_handler(irq, handle, 0); 560 __set_irq_handler(irq, handle, 0, NULL);
559} 561}
560 562
561/* 563void
562 * Get a descriptive string for the highlevel handler, for 564set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
563 * /proc/interrupts output: 565 irq_flow_handler_t handle, const char *name)
564 */
565const char *
566handle_irq_name(irq_flow_handler_t handle)
567{ 566{
568 if (handle == handle_level_irq) 567 set_irq_chip(irq, chip);
569 return "level "; 568 __set_irq_handler(irq, handle, 0, name);
570 if (handle == handle_fasteoi_irq)
571 return "fasteoi";
572 if (handle == handle_edge_irq)
573 return "edge ";
574 if (handle == handle_simple_irq)
575 return "simple ";
576#ifdef CONFIG_SMP
577 if (handle == handle_percpu_irq)
578 return "percpu ";
579#endif
580 if (handle == handle_bad_irq)
581 return "bad ";
582
583 return NULL;
584} 569}