diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-mv64xxx.c')
-rw-r--r-- | drivers/i2c/busses/i2c-mv64xxx.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index 7f186bbcb99d..5a4945d1dba4 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c | |||
@@ -358,7 +358,7 @@ mv64xxx_i2c_wait_for_completion(struct mv64xxx_i2c_data *drv_data) | |||
358 | char abort = 0; | 358 | char abort = 0; |
359 | 359 | ||
360 | time_left = wait_event_interruptible_timeout(drv_data->waitq, | 360 | time_left = wait_event_interruptible_timeout(drv_data->waitq, |
361 | !drv_data->block, msecs_to_jiffies(drv_data->adapter.timeout)); | 361 | !drv_data->block, drv_data->adapter.timeout); |
362 | 362 | ||
363 | spin_lock_irqsave(&drv_data->lock, flags); | 363 | spin_lock_irqsave(&drv_data->lock, flags); |
364 | if (!time_left) { /* Timed out */ | 364 | if (!time_left) { /* Timed out */ |
@@ -374,8 +374,7 @@ mv64xxx_i2c_wait_for_completion(struct mv64xxx_i2c_data *drv_data) | |||
374 | spin_unlock_irqrestore(&drv_data->lock, flags); | 374 | spin_unlock_irqrestore(&drv_data->lock, flags); |
375 | 375 | ||
376 | time_left = wait_event_timeout(drv_data->waitq, | 376 | time_left = wait_event_timeout(drv_data->waitq, |
377 | !drv_data->block, | 377 | !drv_data->block, drv_data->adapter.timeout); |
378 | msecs_to_jiffies(drv_data->adapter.timeout)); | ||
379 | 378 | ||
380 | if ((time_left <= 0) && drv_data->block) { | 379 | if ((time_left <= 0) && drv_data->block) { |
381 | drv_data->state = MV64XXX_I2C_STATE_IDLE; | 380 | drv_data->state = MV64XXX_I2C_STATE_IDLE; |
@@ -530,7 +529,7 @@ mv64xxx_i2c_probe(struct platform_device *pd) | |||
530 | drv_data->adapter.algo = &mv64xxx_i2c_algo; | 529 | drv_data->adapter.algo = &mv64xxx_i2c_algo; |
531 | drv_data->adapter.owner = THIS_MODULE; | 530 | drv_data->adapter.owner = THIS_MODULE; |
532 | drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; | 531 | drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; |
533 | drv_data->adapter.timeout = pdata->timeout; | 532 | drv_data->adapter.timeout = msecs_to_jiffies(pdata->timeout); |
534 | drv_data->adapter.nr = pd->id; | 533 | drv_data->adapter.nr = pd->id; |
535 | platform_set_drvdata(pd, drv_data); | 534 | platform_set_drvdata(pd, drv_data); |
536 | i2c_set_adapdata(&drv_data->adapter, drv_data); | 535 | i2c_set_adapdata(&drv_data->adapter, drv_data); |