aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorKevin Wells <kevin.wells@nxp.com>2009-11-11 18:28:13 -0500
committerBen Dooks <ben-linux@fluff.org>2009-11-19 19:25:41 -0500
commitb2f125bcf5eac41a6d74f75ac573b77753213b74 (patch)
tree856cdacaf82b0b4d84e591604c6609e76874309f /drivers/i2c
parent648f4e3e50c4793d9dbf9a09afa193631f76fa26 (diff)
i2c: i2c-pnx: Limit minimum jiffie timeout to 2
Limit minimum jiffie timeout to 2 to prevent early timeout on systems with low tick rates Signed-off-by: Kevin Wells <kevin.wells@nxp.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-pnx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 6ff6c20f1e78..68c8233b6df0 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -54,6 +54,9 @@ static inline void i2c_pnx_arm_timer(struct i2c_adapter *adap)
54 struct timer_list *timer = &data->mif.timer; 54 struct timer_list *timer = &data->mif.timer;
55 int expires = I2C_PNX_TIMEOUT / (1000 / HZ); 55 int expires = I2C_PNX_TIMEOUT / (1000 / HZ);
56 56
57 if (expires <= 1)
58 expires = 2;
59
57 del_timer_sync(timer); 60 del_timer_sync(timer);
58 61
59 dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n", 62 dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n",