Commit 1b7a2d90 authored by Thomas Gleixner's avatar Thomas Gleixner

arm: Use irq flag setter function

Use the proper accessor function instead of fiddling in the status
bits directly.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
parent 1475b85d
...@@ -144,24 +144,21 @@ asm_do_IRQ(unsigned int irq, struct pt_regs *regs) ...@@ -144,24 +144,21 @@ asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
void set_irq_flags(unsigned int irq, unsigned int iflags) void set_irq_flags(unsigned int irq, unsigned int iflags)
{ {
struct irq_desc *desc; unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
unsigned long flags;
if (irq >= nr_irqs) { if (irq >= nr_irqs) {
printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq); printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq);
return; 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) if (iflags & IRQF_VALID)
desc->status &= ~IRQ_NOREQUEST; clr |= IRQ_NOREQUEST;
if (iflags & IRQF_PROBE) if (iflags & IRQF_PROBE)
desc->status &= ~IRQ_NOPROBE; clr |= IRQ_NOPROBE;
if (!(iflags & IRQF_NOAUTOEN)) if (!(iflags & IRQF_NOAUTOEN))
desc->status &= ~IRQ_NOAUTOEN; clr |= IRQ_NOAUTOEN;
raw_spin_unlock_irqrestore(&desc->lock, flags); /* Order is clear bits in "clr" then set bits in "set" */
irq_modify_status(irq, clr, set & ~clr);
} }
void __init init_IRQ(void) void __init init_IRQ(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment