diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-03-28 16:34:43 -0400 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-03-28 16:34:43 -0400 |
commit | 8a52c6b4d55b2960d93a90a7cf6afd252357fa54 (patch) | |
tree | bdc87e2591e4aa431389acba6efc45a7b620eb62 /drivers/i2c/busses/i2c-mpc.c | |
parent | 8fcfef6e65c5b58e6482eae0b793319c8d9efd44 (diff) |
i2c: Adapter timeout is in jiffies
i2c_adapter.timeout is in jiffies. Fix all drivers which thought
otherwise. It didn't really matter as long as the value was only used
inside the driver, but soon i2c-core will use it too so it must have
the proper unit.
Note: for the i2c-mpc driver, this fixes a bug in polling mode.
Timeout would trigger after 1 jiffy, which is most probably not what
the author wanted.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Clifford Wolf <clifford@clifford.at>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Diffstat (limited to 'drivers/i2c/busses/i2c-mpc.c')
-rw-r--r-- | drivers/i2c/busses/i2c-mpc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index aedbbe6618db..2b847d875946 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
@@ -116,7 +116,7 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing) | |||
116 | } else { | 116 | } else { |
117 | /* Interrupt mode */ | 117 | /* Interrupt mode */ |
118 | result = wait_event_interruptible_timeout(i2c->queue, | 118 | result = wait_event_interruptible_timeout(i2c->queue, |
119 | (i2c->interrupt & CSR_MIF), timeout * HZ); | 119 | (i2c->interrupt & CSR_MIF), timeout); |
120 | 120 | ||
121 | if (unlikely(result < 0)) { | 121 | if (unlikely(result < 0)) { |
122 | pr_debug("I2C: wait interrupted\n"); | 122 | pr_debug("I2C: wait interrupted\n"); |
@@ -311,7 +311,7 @@ static struct i2c_adapter mpc_ops = { | |||
311 | .owner = THIS_MODULE, | 311 | .owner = THIS_MODULE, |
312 | .name = "MPC adapter", | 312 | .name = "MPC adapter", |
313 | .algo = &mpc_algo, | 313 | .algo = &mpc_algo, |
314 | .timeout = 1, | 314 | .timeout = HZ, |
315 | }; | 315 | }; |
316 | 316 | ||
317 | static int __devinit fsl_i2c_probe(struct of_device *op, const struct of_device_id *match) | 317 | static int __devinit fsl_i2c_probe(struct of_device *op, const struct of_device_id *match) |