diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-10-17 03:10:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-17 11:18:45 -0400 |
commit | a460e745e8f9c75a0525ff94154a0629f9d3e05d (patch) | |
tree | 38ef71d81c2ca2f979319b0a91f34f0cf9998643 /kernel/irq | |
parent | 308ba5fcf89b6e328f9290067181c1e4d772fdc9 (diff) |
[PATCH] genirq: clean up irq-flow-type naming
Introduce desc->name and eliminate the handle_irq_name() hack. Add
set_irq_chip_and_handler_name() to set the flow type and name at once.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Matthew Wilcox <willy@debian.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/chip.c | 33 |
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 | ||
501 | void | 501 | void |
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 | /* | 563 | void |
562 | * Get a descriptive string for the highlevel handler, for | 564 | set_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 | */ | ||
565 | const char * | ||
566 | handle_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 | } |