diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-05-27 16:33:41 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-11-08 16:35:48 -0500 |
commit | 40a72c8f711bdf8ae3e4f945261ced5432dcac4d (patch) | |
tree | 7db16daf6e9c25b01dcb9b0e20e3588589de969a | |
parent | 13d6da35813babaa1bc8c6799b2666191911100e (diff) |
m68k/irq: Extract irq_set_chip()
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/m68k/kernel/ints.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index e68a3bd5de6e..4f9868e160bd 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c | |||
@@ -55,6 +55,12 @@ static struct irq_data *irq_list[NR_IRQS]; | |||
55 | static struct irq_chip *irq_chip[NR_IRQS]; | 55 | static struct irq_chip *irq_chip[NR_IRQS]; |
56 | static int irq_depth[NR_IRQS]; | 56 | static int irq_depth[NR_IRQS]; |
57 | 57 | ||
58 | static inline int irq_set_chip(unsigned int irq, struct irq_chip *chip) | ||
59 | { | ||
60 | irq_chip[irq] = chip; | ||
61 | return 0; | ||
62 | } | ||
63 | |||
58 | static int m68k_first_user_vec; | 64 | static int m68k_first_user_vec; |
59 | 65 | ||
60 | static struct irq_chip auto_irq_chip = { | 66 | static struct irq_chip auto_irq_chip = { |
@@ -94,7 +100,7 @@ void __init init_IRQ(void) | |||
94 | } | 100 | } |
95 | 101 | ||
96 | for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++) | 102 | for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++) |
97 | irq_chip[i] = &auto_irq_chip; | 103 | irq_set_chip(i, &auto_irq_chip); |
98 | 104 | ||
99 | mach_init_IRQ(); | 105 | mach_init_IRQ(); |
100 | } | 106 | } |
@@ -134,7 +140,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | |||
134 | BUG_ON(IRQ_USER + cnt > NR_IRQS); | 140 | BUG_ON(IRQ_USER + cnt > NR_IRQS); |
135 | m68k_first_user_vec = vec; | 141 | m68k_first_user_vec = vec; |
136 | for (i = 0; i < cnt; i++) | 142 | for (i = 0; i < cnt; i++) |
137 | irq_chip[IRQ_USER + i] = &user_irq_chip; | 143 | irq_set_chip(IRQ_USER + i, &user_irq_chip); |
138 | *user_irqvec_fixup = vec - IRQ_USER; | 144 | *user_irqvec_fixup = vec - IRQ_USER; |
139 | if (handler) | 145 | if (handler) |
140 | *user_irqhandler_fixup = (u32)handler; | 146 | *user_irqhandler_fixup = (u32)handler; |
@@ -157,7 +163,7 @@ void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq, | |||
157 | int i; | 163 | int i; |
158 | 164 | ||
159 | for (i = 0; i < cnt; i++) | 165 | for (i = 0; i < cnt; i++) |
160 | irq_chip[irq + i] = contr; | 166 | irq_set_chip(irq + i, contr); |
161 | } | 167 | } |
162 | 168 | ||
163 | struct irq_data *new_irq_node(void) | 169 | struct irq_data *new_irq_node(void) |