aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-07 22:30:49 +0100
committerThomas Gleixner <tglx@linutronix.de>2011-03-29 14:47:52 +0200
commit1b7a2d90c83bec624ac89f0642cb57bed17a2d3d (patch)
tree2543ac3b3b4b0dfc73d45a013e21d587d273ec47 /arch/arm/kernel
parent1475b85d08b51b5ee2b7b426247d3ef3f531eafe (diff)
downloadkernel_goldelico_gta04-1b7a2d90c83bec624ac89f0642cb57bed17a2d3d.zip
kernel_goldelico_gta04-1b7a2d90c83bec624ac89f0642cb57bed17a2d3d.tar.gz
kernel_goldelico_gta04-1b7a2d90c83bec624ac89f0642cb57bed17a2d3d.tar.bz2
arm: Use irq flag setter function
Use the proper accessor function instead of fiddling in the status bits directly. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux-arm-kernel@lists.infradead.org
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/irq.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 3535d37..9b3a6d8 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -144,24 +144,21 @@ asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
void set_irq_flags(unsigned int irq, unsigned int iflags)
{
- struct irq_desc *desc;
- unsigned long flags;
+ unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
if (irq >= nr_irqs) {
printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq);
return;
}
- desc = irq_to_desc(irq);
- raw_spin_lock_irqsave(&desc->lock, flags);
- desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
if (iflags & IRQF_VALID)
- desc->status &= ~IRQ_NOREQUEST;
+ clr |= IRQ_NOREQUEST;
if (iflags & IRQF_PROBE)
- desc->status &= ~IRQ_NOPROBE;
+ clr |= IRQ_NOPROBE;
if (!(iflags & IRQF_NOAUTOEN))
- desc->status &= ~IRQ_NOAUTOEN;
- raw_spin_unlock_irqrestore(&desc->lock, flags);
+ clr |= IRQ_NOAUTOEN;
+ /* Order is clear bits in "clr" then set bits in "set" */
+ irq_modify_status(irq, clr, set & ~clr);
}
void __init init_IRQ(void)