summaryrefslogtreecommitdiffstats
path: root/arch/mips/emma/common
diff options
context:
space:
mode:
authorShinya Kuribayashi <skuribay@ruby.dti.ne.jp>2008-10-23 18:31:16 +0200
committerRalf Baechle <ralf@linux-mips.org>2008-10-27 17:18:30 +0100
commit9b6c04bc9726edf2655dd69d2e40c0ae4f07e525 (patch)
tree1dddebddbb43edd6f2f754c959452c42e1961016 /arch/mips/emma/common
parentMIPS: EMMA2RH: Remove emma2rh_sync on read operation (diff)
downloadlinux-9b6c04bc9726edf2655dd69d2e40c0ae4f07e525.tar.xz
linux-9b6c04bc9726edf2655dd69d2e40c0ae4f07e525.zip
MIPS: EMMA2RH: Remove emma2rh_irq_base global variable
Let's use immediate value, instead. This also saves memory footprint, and probably a little bit faster. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/emma/common')
-rw-r--r--arch/mips/emma/common/irq_emma2rh.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/mips/emma/common/irq_emma2rh.c b/arch/mips/emma/common/irq_emma2rh.c
index 23ac959ce43c..4f84fede4c4c 100644
--- a/arch/mips/emma/common/irq_emma2rh.c
+++ b/arch/mips/emma/common/irq_emma2rh.c
@@ -41,19 +41,17 @@
/* number of total irqs supported by EMMA2RH */
#define NUM_EMMA2RH_IRQ 96
-static int emma2rh_irq_base = -1;
-
void ll_emma2rh_irq_enable(int);
void ll_emma2rh_irq_disable(int);
static void emma2rh_irq_enable(unsigned int irq)
{
- ll_emma2rh_irq_enable(irq - emma2rh_irq_base);
+ ll_emma2rh_irq_enable(irq - EMMA2RH_IRQ_BASE);
}
static void emma2rh_irq_disable(unsigned int irq)
{
- ll_emma2rh_irq_disable(irq - emma2rh_irq_base);
+ ll_emma2rh_irq_disable(irq - EMMA2RH_IRQ_BASE);
}
struct irq_chip emma2rh_irq_controller = {
@@ -64,15 +62,14 @@ struct irq_chip emma2rh_irq_controller = {
.unmask = emma2rh_irq_enable,
};
-void emma2rh_irq_init(u32 irq_base)
+void emma2rh_irq_init(void)
{
u32 i;
- for (i = irq_base; i < irq_base + NUM_EMMA2RH_IRQ; i++)
- set_irq_chip_and_handler(i, &emma2rh_irq_controller,
+ for (i = 0; i < NUM_EMMA2RH_IRQ; i++)
+ set_irq_chip_and_handler(EMMA2RH_IRQ_BASE + i,
+ &emma2rh_irq_controller,
handle_level_irq);
-
- emma2rh_irq_base = irq_base;
}
void ll_emma2rh_irq_enable(int emma2rh_irq)