diff options
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/algos/i2c-algo-bit.c | 4 | ||||
-rw-r--r-- | drivers/i2c/algos/i2c-algo-pcf.c | 1 | ||||
-rw-r--r-- | drivers/i2c/i2c-core.c | 5 |
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index eb8f72ca02f4..d420cc5f5633 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c | |||
@@ -604,9 +604,7 @@ static int i2c_bit_prepare_bus(struct i2c_adapter *adap) | |||
604 | 604 | ||
605 | /* register new adapter to i2c module... */ | 605 | /* register new adapter to i2c module... */ |
606 | adap->algo = &i2c_bit_algo; | 606 | adap->algo = &i2c_bit_algo; |
607 | 607 | adap->retries = 3; | |
608 | adap->timeout = 100; /* default values, should */ | ||
609 | adap->retries = 3; /* be replaced by defines */ | ||
610 | 608 | ||
611 | return 0; | 609 | return 0; |
612 | } | 610 | } |
diff --git a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c index d31147e10774..7ce75775ec73 100644 --- a/drivers/i2c/algos/i2c-algo-pcf.c +++ b/drivers/i2c/algos/i2c-algo-pcf.c | |||
@@ -423,7 +423,6 @@ int i2c_pcf_add_bus(struct i2c_adapter *adap) | |||
423 | 423 | ||
424 | /* register new adapter to i2c module... */ | 424 | /* register new adapter to i2c module... */ |
425 | adap->algo = &pcf_algo; | 425 | adap->algo = &pcf_algo; |
426 | adap->timeout = 100; | ||
427 | 426 | ||
428 | if ((rval = pcf_init_8584(pcf_adap))) | 427 | if ((rval = pcf_init_8584(pcf_adap))) |
429 | return rval; | 428 | return rval; |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 456caa80bfd3..e361033815d3 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -459,6 +459,11 @@ static int i2c_register_adapter(struct i2c_adapter *adap) | |||
459 | pr_debug("I2C adapter driver [%s] forgot to specify " | 459 | pr_debug("I2C adapter driver [%s] forgot to specify " |
460 | "physical device\n", adap->name); | 460 | "physical device\n", adap->name); |
461 | } | 461 | } |
462 | |||
463 | /* Set default timeout to 1 second if not already set */ | ||
464 | if (adap->timeout == 0) | ||
465 | adap->timeout = HZ; | ||
466 | |||
462 | dev_set_name(&adap->dev, "i2c-%d", adap->nr); | 467 | dev_set_name(&adap->dev, "i2c-%d", adap->nr); |
463 | adap->dev.release = &i2c_adapter_dev_release; | 468 | adap->dev.release = &i2c_adapter_dev_release; |
464 | adap->dev.class = &i2c_adapter_class; | 469 | adap->dev.class = &i2c_adapter_class; |