genirq: Add missing buslock to set_irq_type(), set_irq_wake()
chips behind a slow bus cannot update the chip under desc->lock, but we miss the chip_buslock/chip_bus_sync_unlock() calls around the set type and set wake functions. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
e7bcecb7b1
commit
43abe43ce0
|
@ -65,9 +65,11 @@ int set_irq_type(unsigned int irq, unsigned int type)
|
||||||
if (type == IRQ_TYPE_NONE)
|
if (type == IRQ_TYPE_NONE)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
chip_bus_lock(desc);
|
||||||
raw_spin_lock_irqsave(&desc->lock, flags);
|
raw_spin_lock_irqsave(&desc->lock, flags);
|
||||||
ret = __irq_set_trigger(desc, irq, type);
|
ret = __irq_set_trigger(desc, irq, type);
|
||||||
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
||||||
|
chip_bus_sync_unlock(desc);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(set_irq_type);
|
EXPORT_SYMBOL(set_irq_type);
|
||||||
|
|
|
@ -454,6 +454,7 @@ int set_irq_wake(unsigned int irq, unsigned int on)
|
||||||
/* wakeup-capable irqs can be shared between drivers that
|
/* wakeup-capable irqs can be shared between drivers that
|
||||||
* don't need to have the same sleep mode behaviors.
|
* don't need to have the same sleep mode behaviors.
|
||||||
*/
|
*/
|
||||||
|
chip_bus_lock(desc);
|
||||||
raw_spin_lock_irqsave(&desc->lock, flags);
|
raw_spin_lock_irqsave(&desc->lock, flags);
|
||||||
if (on) {
|
if (on) {
|
||||||
if (desc->wake_depth++ == 0) {
|
if (desc->wake_depth++ == 0) {
|
||||||
|
@ -476,6 +477,7 @@ int set_irq_wake(unsigned int irq, unsigned int on)
|
||||||
}
|
}
|
||||||
|
|
||||||
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
||||||
|
chip_bus_sync_unlock(desc);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(set_irq_wake);
|
EXPORT_SYMBOL(set_irq_wake);
|
||||||
|
|
Loading…
Reference in New Issue