diff options
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 11c99697acfe..ebfd24a41858 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -233,6 +233,8 @@ void irq_chip_set_defaults(struct irq_chip *chip) | |||
233 | chip->shutdown = chip->disable; | 233 | chip->shutdown = chip->disable; |
234 | if (!chip->name) | 234 | if (!chip->name) |
235 | chip->name = chip->typename; | 235 | chip->name = chip->typename; |
236 | if (!chip->end) | ||
237 | chip->end = dummy_irq_chip.end; | ||
236 | } | 238 | } |
237 | 239 | ||
238 | static inline void mask_ack_irq(struct irq_desc *desc, int irq) | 240 | static inline void mask_ack_irq(struct irq_desc *desc, int irq) |
@@ -499,7 +501,8 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc) | |||
499 | #endif /* CONFIG_SMP */ | 501 | #endif /* CONFIG_SMP */ |
500 | 502 | ||
501 | void | 503 | void |
502 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained) | 504 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, |
505 | const char *name) | ||
503 | { | 506 | { |
504 | struct irq_desc *desc; | 507 | struct irq_desc *desc; |
505 | unsigned long flags; | 508 | unsigned long flags; |
@@ -540,6 +543,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained) | |||
540 | desc->depth = 1; | 543 | desc->depth = 1; |
541 | } | 544 | } |
542 | desc->handle_irq = handle; | 545 | desc->handle_irq = handle; |
546 | desc->name = name; | ||
543 | 547 | ||
544 | if (handle != handle_bad_irq && is_chained) { | 548 | if (handle != handle_bad_irq && is_chained) { |
545 | desc->status &= ~IRQ_DISABLED; | 549 | desc->status &= ~IRQ_DISABLED; |
@@ -555,30 +559,13 @@ set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | |||
555 | irq_flow_handler_t handle) | 559 | irq_flow_handler_t handle) |
556 | { | 560 | { |
557 | set_irq_chip(irq, chip); | 561 | set_irq_chip(irq, chip); |
558 | __set_irq_handler(irq, handle, 0); | 562 | __set_irq_handler(irq, handle, 0, NULL); |
559 | } | 563 | } |
560 | 564 | ||
561 | /* | 565 | void |
562 | * Get a descriptive string for the highlevel handler, for | 566 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, |
563 | * /proc/interrupts output: | 567 | irq_flow_handler_t handle, const char *name) |
564 | */ | ||
565 | const char * | ||
566 | handle_irq_name(irq_flow_handler_t handle) | ||
567 | { | 568 | { |
568 | if (handle == handle_level_irq) | 569 | set_irq_chip(irq, chip); |
569 | return "level "; | 570 | __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 | } | 571 | } |