aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-06-29 05:24:46 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 13:26:23 -0400
commit77a5afecdb15e65034ab8390b46b824c186c62a8 (patch)
treea01c9d567f74ac979f3e4ab1122312eca1e693d7
parent8d28bc751bb9ad479e33964d5d9eedfe5fb488a5 (diff)
[PATCH] genirq: cleanup: no_irq_type cleanups
Clean up no_irq_type: share the NOP functions where possible, and properly name the ack_bad() function. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--kernel/irq/handle.c45
1 files changed, 25 insertions, 20 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 7fc7bc33d497..402fa3aec1e4 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -40,32 +40,37 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned = {
40}; 40};
41 41
42/* 42/*
43 * Generic 'no controller' code 43 * What should we do if we get a hw irq event on an illegal vector?
44 * Each architecture has to answer this themself.
44 */ 45 */
45static void end_none(unsigned int irq) { } 46static void ack_bad(unsigned int irq)
46static void enable_none(unsigned int irq) { }
47static void disable_none(unsigned int irq) { }
48static void shutdown_none(unsigned int irq) { }
49static unsigned int startup_none(unsigned int irq) { return 0; }
50
51static void ack_none(unsigned int irq)
52{ 47{
53 /*
54 * 'what should we do if we get a hw irq event on an illegal vector'.
55 * each architecture has to answer this themself.
56 */
57 ack_bad_irq(irq); 48 ack_bad_irq(irq);
58} 49}
59 50
51/*
52 * NOP functions
53 */
54static void noop(unsigned int irq)
55{
56}
57
58static unsigned int noop_ret(unsigned int irq)
59{
60 return 0;
61}
62
63/*
64 * Generic no controller implementation
65 */
60struct hw_interrupt_type no_irq_type = { 66struct hw_interrupt_type no_irq_type = {
61 .typename = "none", 67 .typename = "none",
62 .startup = startup_none, 68 .startup = noop_ret,
63 .shutdown = shutdown_none, 69 .shutdown = noop,
64 .enable = enable_none, 70 .enable = noop,
65 .disable = disable_none, 71 .disable = noop,
66 .ack = ack_none, 72 .ack = ack_bad,
67 .end = end_none, 73 .end = noop,
68 .set_affinity = NULL
69}; 74};
70 75
71/* 76/*