aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/adm8668/files/arch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-12-06 22:39:27 +0000
committerFlorian Fainelli <florian@openwrt.org>2012-12-06 22:39:27 +0000
commitf85115efd8e3ef399f015bbbe9d9468d5a5ba8b4 (patch)
treed9f6c2e2ffc12dd82c553af82beec876318166e8 /target/linux/adm8668/files/arch
parent50303d52e296a7e80951044dec12c248a456870c (diff)
downloadupstream-f85115efd8e3ef399f015bbbe9d9468d5a5ba8b4.tar.gz
upstream-f85115efd8e3ef399f015bbbe9d9468d5a5ba8b4.tar.bz2
upstream-f85115efd8e3ef399f015bbbe9d9468d5a5ba8b4.zip
simplify IRQ controller code
Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 34546
Diffstat (limited to 'target/linux/adm8668/files/arch')
-rw-r--r--target/linux/adm8668/files/arch/mips/adm8668/irq.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/target/linux/adm8668/files/arch/mips/adm8668/irq.c b/target/linux/adm8668/files/arch/mips/adm8668/irq.c
index e048c15c8a..9fa9e675e4 100644
--- a/target/linux/adm8668/files/arch/mips/adm8668/irq.c
+++ b/target/linux/adm8668/files/arch/mips/adm8668/irq.c
@@ -52,33 +52,13 @@ void plat_irq_dispatch(void)
*/
static void enable_adm8668_irq(struct irq_data *d)
{
- int irq = d->irq;
-
- if ((irq < 0) || (irq > NR_IRQS))
- return;
-
- ADM8668_INTC_REG(IRQ_ENABLE_REG) = (1 << irq);
+ ADM8668_INTC_REG(IRQ_ENABLE_REG) = (1 << d->irq);
}
-/*
- * disable 8668 irq
- */
-static void disable_adm8668_irq(struct irq_data *d)
-{
- int irq = d->irq;
-
- if ((irq < 0) || (irq > NR_IRQS))
- return;
-
- ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << irq);
-}
-
static void ack_adm8668_irq(struct irq_data *d)
{
- int irq = d->irq;
-
- ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << irq);
+ ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << d->irq);
}
/*
@@ -88,7 +68,7 @@ static void ack_adm8668_irq(struct irq_data *d)
static struct irq_chip adm8668_irq_type = {
.name = "adm8668",
.irq_ack = ack_adm8668_irq,
- .irq_mask = disable_adm8668_irq,
+ .irq_mask = ack_adm8668_irq,
.irq_unmask = enable_adm8668_irq
};