Skip to content

Commit

Permalink
i2c: imx: fix imx driver to work though signal is pending
Browse files Browse the repository at this point in the history
Interrupt a test application for I2C based mc13xxx driven
touch panel, SIGINT, causes open event file descriptor to be
closed, which in turn causes I2C activity to mask PMIC local
interrupts. This eventually ends up in i2c_imx_bus_busy to
wait for some busy flag to toggle, but while waiting it would
find a signal pending and break. The final symptom is the
device is not closed down cleanly and thus not reopenable.

Do without check for pending signal.

Signed-off-by: Oskar Schirmer <oskar@scara.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
  • Loading branch information
Oskar Schirmer authored and Wolfram Sang committed Feb 29, 2012
1 parent 1045228 commit bb79a07
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/i2c/busses/i2c-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy)
break;
if (!for_busy && !(temp & I2SR_IBB))
break;
if (signal_pending(current)) {
dev_dbg(&i2c_imx->adapter.dev,
"<%s> I2C Interrupted\n", __func__);
return -EINTR;
}
if (time_after(jiffies, orig_jiffies + msecs_to_jiffies(500))) {
dev_dbg(&i2c_imx->adapter.dev,
"<%s> I2C bus is busy\n", __func__);
Expand Down

0 comments on commit bb79a07

Please sign in to comment.