aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2011-03-20 09:50:52 -0400
committerJean Delvare <khali@endymion.delvare>2011-03-20 09:50:52 -0400
commit7ae31482a8376fb0df3a0c5ff0677a92820c06b7 (patch)
tree4c5c6b7de9c2f3775d41378e380f49918c3a9230 /include/linux/i2c.h
parent0c31f8e5720e1191b4cf46a9b5374fe6b857c53c (diff)
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>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 3963a5567472..4df12c7e69d7 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)
395 return NULL; 395 return NULL;
396} 396}
397 397
398int i2c_for_each_dev(void *data, int (*fn)(struct device *, void *));
399
398/* Adapter locking functions, exported for shared pin cases */ 400/* Adapter locking functions, exported for shared pin cases */
399void i2c_lock_adapter(struct i2c_adapter *); 401void i2c_lock_adapter(struct i2c_adapter *);
400void i2c_unlock_adapter(struct i2c_adapter *); 402void i2c_unlock_adapter(struct i2c_adapter *);