aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorVikram Pandita <vikram.pandita@ti.com>2011-09-11 21:42:58 -0700
committerTodd Poynor <toddpoynor@google.com>2011-09-16 10:45:27 -0700
commitc8475c64f8d1c6589aced5e87f957ea9c6819b19 (patch)
tree9316498db66e7eff7d243ea8a18f8e5040391ab3 /drivers/i2c
parent590ff32a5128f43bde23288a218cdbcc6c461e08 (diff)
downloadkernel_samsung_espresso10-c8475c64f8d1c6589aced5e87f957ea9c6819b19.tar.gz
kernel_samsung_espresso10-c8475c64f8d1c6589aced5e87f957ea9c6819b19.tar.bz2
kernel_samsung_espresso10-c8475c64f8d1c6589aced5e87f957ea9c6819b19.zip
i2c: omap: avoid reading interrupt enable register
dev->iestate variable has the correct info on the interrupts enabled at any time. So avoid un-necessary I2C_IE_REG read. Change-Id: I75e315ef51b3f30bb41680cda7f4921218458fc1 Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-omap.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 0d6e0e7c802..974e9a9c09a 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -806,15 +806,13 @@ static irqreturn_t
omap_i2c_isr(int this_irq, void *dev_id)
{
struct omap_i2c_dev *dev = dev_id;
- u16 bits;
u16 stat, w;
int err, count = 0;
if (dev->idle)
return IRQ_NONE;
- bits = omap_i2c_read_reg(dev, OMAP_I2C_IE_REG);
- while ((stat = (omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG))) & bits) {
+ while ((stat = (omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG))) & dev->iestate) {
dev_dbg(dev->dev, "IRQ (ISR = 0x%04x)\n", stat);
if (count++ == 100) {
dev_warn(dev->dev, "Too much work in one IRQ\n");