i2c/omap: drop the lock hard irq context

The lock is taken while reading two registers. On RT the first lock is
taken in hard irq where it might sleep and in the threaded irq.
The threaded irq runs in oneshot mode so the hard irq does not run until
the thread the completes so there is no reason to grab the lock.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
This commit is contained in:
Sebastian Andrzej Siewior 2013-03-21 11:35:49 +01:00 committed by Alibek Omarov
parent 16a70d5345
commit b83d9c8fd4
1 changed files with 1 additions and 4 deletions

View File

@ -879,15 +879,12 @@ omap_i2c_isr(int irq, void *dev_id)
u16 mask;
u16 stat;
spin_lock(&dev->lock);
mask = omap_i2c_read_reg(dev, OMAP_I2C_IE_REG);
stat = omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG);
mask = omap_i2c_read_reg(dev, OMAP_I2C_IE_REG);
if (stat & mask)
ret = IRQ_WAKE_THREAD;
spin_unlock(&dev->lock);
return ret;
}