Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228470
b: refs/heads/master
c: af5a60b
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Jan 10, 2011
1 parent eef76e0 commit f5b41cc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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: f451171c5ac829e55581c81caf2cb01e1c0a5c5f
refs/heads/master: af5a60baaee66e2f891dbb9a8519ca28ab7da7cd
14 changes: 12 additions & 2 deletions trunk/drivers/i2c/algos/i2c-algo-bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,10 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap,
int (*add_adapter)(struct i2c_adapter *))
{
struct i2c_algo_bit_data *bit_adap = adap->algo_data;
int ret;

if (bit_test) {
int ret = test_bus(bit_adap, adap->name);
ret = test_bus(bit_adap, adap->name);
if (ret < 0)
return -ENODEV;
}
Expand All @@ -615,7 +616,16 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap,
adap->algo = &i2c_bit_algo;
adap->retries = 3;

return add_adapter(adap);
ret = add_adapter(adap);
if (ret < 0)
return ret;

/* Complain if SCL can't be read */
if (bit_adap->getscl == NULL) {
dev_warn(&adap->dev, "Not I2C compliant: can't read SCL\n");
dev_warn(&adap->dev, "Bus may be unreliable\n");
}
return 0;
}

int i2c_bit_add_bus(struct i2c_adapter *adap)
Expand Down

0 comments on commit f5b41cc

Please sign in to comment.