i2c: Export i2c_for_each_dev
Introduce i2c_for_each_dev(), an i2c device iterator with proper locking for use by i2c-dev. This is needed so that we can get rid of the attach_adapter and detach_adapter legacy callback functions. Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
committed by
Jean Delvare
parent
0c31f8e572
commit
7ae31482a8
@@ -395,6 +395,8 @@ i2c_parent_is_i2c_adapter(const struct i2c_adapter *adapter)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int i2c_for_each_dev(void *data, int (*fn)(struct device *, void *));
|
||||
|
||||
/* Adapter locking functions, exported for shared pin cases */
|
||||
void i2c_lock_adapter(struct i2c_adapter *);
|
||||
void i2c_unlock_adapter(struct i2c_adapter *);
|
||||
|
Reference in New Issue
Block a user