Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53251
b: refs/heads/master
c: 0f3b483
h: refs/heads/master
i:
  53249: 9594619
  53247: 2f024ad
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed May 1, 2007
1 parent eebf9e9 commit b412fed
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 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: c05646069ccf8e94031ca9c8ab18fff35ba4405e
refs/heads/master: 0f3b48385213355a2d4408bec1b481ffcf0e8638
25 changes: 24 additions & 1 deletion trunk/drivers/i2c/algos/i2c-algo-bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ static const struct i2c_algorithm i2c_bit_algo = {
/*
* registering functions to load algorithms at runtime
*/
int i2c_bit_add_bus(struct i2c_adapter *adap)
static int i2c_bit_prepare_bus(struct i2c_adapter *adap)
{
struct i2c_algo_bit_data *bit_adap = adap->algo_data;

Expand All @@ -558,10 +558,33 @@ int i2c_bit_add_bus(struct i2c_adapter *adap)
adap->timeout = 100; /* default values, should */
adap->retries = 3; /* be replaced by defines */

return 0;
}

int i2c_bit_add_bus(struct i2c_adapter *adap)
{
int err;

err = i2c_bit_prepare_bus(adap);
if (err)
return err;

return i2c_add_adapter(adap);
}
EXPORT_SYMBOL(i2c_bit_add_bus);

int i2c_bit_add_numbered_bus(struct i2c_adapter *adap)
{
int err;

err = i2c_bit_prepare_bus(adap);
if (err)
return err;

return i2c_add_numbered_adapter(adap);
}
EXPORT_SYMBOL(i2c_bit_add_numbered_bus);

MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");
MODULE_DESCRIPTION("I2C-Bus bit-banging algorithm");
MODULE_LICENSE("GPL");
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/i2c-algo-bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ struct i2c_algo_bit_data {
};

int i2c_bit_add_bus(struct i2c_adapter *);
int i2c_bit_add_numbered_bus(struct i2c_adapter *);

#endif /* _LINUX_I2C_ALGO_BIT_H */

0 comments on commit b412fed

Please sign in to comment.