aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2013-03-21 11:35:49 +0100
committerAnders Roxell <anders.roxell@linaro.org>2015-08-17 08:59:54 +0200
commitd61c119ef93dc14f600c7c4b8caca97d36af7126 (patch)
treebabb56cab12d60038ee48b4285a7182a2a5c4d77
parentbd1c4a1e67fb26e161cdb6542d060f26474ff4b0 (diff)
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>
-rw-r--r--drivers/i2c/busses/i2c-omap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 0e894193accf..2f9de5ecb6ed 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -996,15 +996,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;
}