From 7ae31482a8376fb0df3a0c5ff0677a92820c06b7 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 20 Mar 2011 14:50:52 +0100 Subject: 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 --- include/linux/i2c.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/i2c.h') diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 3963a55..4df12c7 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -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 *); -- cgit v1.1