Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137567
b: refs/heads/master
c: 8fcfef6
h: refs/heads/master
i:
  137565: cfb910b
  137563: f15f9a7
  137559: e7ec5d2
  137551: f2b8f1d
  137535: 491e6bd
v: v3
  • Loading branch information
Jean Delvare committed Mar 28, 2009
1 parent 149f8f5 commit 409d834
Show file tree
Hide file tree
Showing 4 changed files with 7 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: 154d22b04ae1741c5fcfd5d747b813a9a279abff
refs/heads/master: 8fcfef6e65c5b58e6482eae0b793319c8d9efd44
4 changes: 1 addition & 3 deletions trunk/drivers/i2c/algos/i2c-algo-bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,7 @@ static int i2c_bit_prepare_bus(struct i2c_adapter *adap)

/* register new adapter to i2c module... */
adap->algo = &i2c_bit_algo;

adap->timeout = 100; /* default values, should */
adap->retries = 3; /* be replaced by defines */
adap->retries = 3;

return 0;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/i2c/algos/i2c-algo-pcf.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ int i2c_pcf_add_bus(struct i2c_adapter *adap)

/* register new adapter to i2c module... */
adap->algo = &pcf_algo;
adap->timeout = 100;

if ((rval = pcf_init_8584(pcf_adap)))
return rval;
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
pr_debug("I2C adapter driver [%s] forgot to specify "
"physical device\n", adap->name);
}

/* Set default timeout to 1 second if not already set */
if (adap->timeout == 0)
adap->timeout = HZ;

dev_set_name(&adap->dev, "i2c-%d", adap->nr);
adap->dev.release = &i2c_adapter_dev_release;
adap->dev.class = &i2c_adapter_class;
Expand Down

0 comments on commit 409d834

Please sign in to comment.