[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1319978915-10933-8-git-send-email-geert@linux-m68k.org>
Date: Sun, 30 Oct 2011 13:48:15 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: linux-m68k@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Greg Ungerer <gerg@...inux.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 07/27] m68k/irq: Extract irq_set_chip()
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Acked-by: Thomas Gleixner <tglx@...utronix.de>
---
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 e68a3bd..4f9868e 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];
static struct irq_chip *irq_chip[NR_IRQS];
static int irq_depth[NR_IRQS];
+static inline int irq_set_chip(unsigned int irq, struct irq_chip *chip)
+{
+ irq_chip[irq] = chip;
+ return 0;
+}
+
static int m68k_first_user_vec;
static struct irq_chip auto_irq_chip = {
@@ -94,7 +100,7 @@ void __init init_IRQ(void)
}
for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
- irq_chip[i] = &auto_irq_chip;
+ irq_set_chip(i, &auto_irq_chip);
mach_init_IRQ();
}
@@ -134,7 +140,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
BUG_ON(IRQ_USER + cnt > NR_IRQS);
m68k_first_user_vec = vec;
for (i = 0; i < cnt; i++)
- irq_chip[IRQ_USER + i] = &user_irq_chip;
+ irq_set_chip(IRQ_USER + i, &user_irq_chip);
*user_irqvec_fixup = vec - IRQ_USER;
if (handler)
*user_irqhandler_fixup = (u32)handler;
@@ -157,7 +163,7 @@ void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq,
int i;
for (i = 0; i < cnt; i++)
- irq_chip[irq + i] = contr;
+ irq_set_chip(irq + i, contr);
}
struct irq_data *new_irq_node(void)
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists