aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-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 3535d3793e65..9b3a6d86e8c1 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)
144 144
145void set_irq_flags(unsigned int irq, unsigned int iflags) 145void set_irq_flags(unsigned int irq, unsigned int iflags)
146{ 146{
147 struct irq_desc *desc; 147 unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
148 unsigned long flags;
149 148
150 if (irq >= nr_irqs) { 149 if (irq >= nr_irqs) {
151 printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq); 150 printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq);
152 return; 151 return;
153 } 152 }
154 153
155 desc = irq_to_desc(irq);
156 raw_spin_lock_irqsave(&desc->lock, flags);
157 desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
158 if (iflags & IRQF_VALID) 154 if (iflags & IRQF_VALID)
159 desc->status &= ~IRQ_NOREQUEST; 155 clr |= IRQ_NOREQUEST;
160 if (iflags & IRQF_PROBE) 156 if (iflags & IRQF_PROBE)
161 desc->status &= ~IRQ_NOPROBE; 157 clr |= IRQ_NOPROBE;
162 if (!(iflags & IRQF_NOAUTOEN)) 158 if (!(iflags & IRQF_NOAUTOEN))
163 desc->status &= ~IRQ_NOAUTOEN; 159 clr |= IRQ_NOAUTOEN;
164 raw_spin_unlock_irqrestore(&desc->lock, flags); 160 /* Order is clear bits in "clr" then set bits in "set" */
161 irq_modify_status(irq, clr, set & ~clr);
165} 162}
166 163
167void __init init_IRQ(void) 164void __init init_IRQ(void)