Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250842
b: refs/heads/master
c: cd20e4f
h: refs/heads/master
v: v3
  • Loading branch information
Virupax Sadashivpetimath authored and Ben Dooks committed May 24, 2011
1 parent b4b190c commit f257f41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c436f92a4646e4635554bda39407dfb907352321
refs/heads/master: cd20e4fa910540c339b483d0b95ca237abf3354a
9 changes: 5 additions & 4 deletions trunk/drivers/i2c/busses/i2c-nomadik.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static int flush_i2c_fifo(struct nmk_i2c_dev *dev)
writel((I2C_CR_FTX | I2C_CR_FRX), dev->virtbase + I2C_CR);

for (i = 0; i < LOOP_ATTEMPTS; i++) {
timeout = jiffies + msecs_to_jiffies(dev->adap.timeout);
timeout = jiffies + dev->adap.timeout;

while (!time_after(jiffies, timeout)) {
if ((readl(dev->virtbase + I2C_CR) &
Expand Down Expand Up @@ -431,7 +431,7 @@ static int read_i2c(struct nmk_i2c_dev *dev)
dev->virtbase + I2C_IMSCR);

timeout = wait_for_completion_interruptible_timeout(
&dev->xfer_complete, msecs_to_jiffies(dev->adap.timeout));
&dev->xfer_complete, dev->adap.timeout);

if (timeout < 0) {
dev_err(&dev->pdev->dev,
Expand Down Expand Up @@ -495,7 +495,7 @@ static int write_i2c(struct nmk_i2c_dev *dev)
dev->virtbase + I2C_IMSCR);

timeout = wait_for_completion_interruptible_timeout(
&dev->xfer_complete, msecs_to_jiffies(dev->adap.timeout));
&dev->xfer_complete, dev->adap.timeout);

if (timeout < 0) {
dev_err(&dev->pdev->dev,
Expand Down Expand Up @@ -914,7 +914,8 @@ static int __devinit nmk_i2c_probe(struct platform_device *pdev)
adap->owner = THIS_MODULE;
adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
adap->algo = &nmk_i2c_algo;
adap->timeout = pdata->timeout ? pdata->timeout : 20000;
adap->timeout = pdata->timeout ? msecs_to_jiffies(pdata->timeout) :
msecs_to_jiffies(20000);
snprintf(adap->name, sizeof(adap->name),
"Nomadik I2C%d at %lx", pdev->id, (unsigned long)res->start);

Expand Down

0 comments on commit f257f41

Please sign in to comment.