aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJiri Kosina <jikos@jikos.cz>2006-12-10 15:21:30 -0500
committerJean Delvare <khali@arrakis.delvare>2006-12-10 15:21:30 -0500
commit6ea23039cb1cc7c379eb5fba0ed2c53291e9bea7 (patch)
treec22887d242a0c3813789c63c4db2fd59b1f3ef7e /include
parentad04d5c3879dcf79ba0fa1826eab991f7b7a2de8 (diff)
i2c: Add support for nested i2c bus locking
This patch adds the 'level' field into the i2c_adapter structure, which is used to represent the 'logical' level of nesting for the purposes of lockdep. This field is then used in the i2c_transfer() function, to acquire the per-adapter bus_lock with correct nesting level. Signed-off-by: Jiri Kosina <jikos@jikos.cz> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 9b5d04768c2c..08df4169b411 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -216,6 +216,7 @@ struct i2c_adapter {
216 int (*client_unregister)(struct i2c_client *); 216 int (*client_unregister)(struct i2c_client *);
217 217
218 /* data fields that are valid for all devices */ 218 /* data fields that are valid for all devices */
219 u8 level; /* nesting level for lockdep */
219 struct mutex bus_lock; 220 struct mutex bus_lock;
220 struct mutex clist_lock; 221 struct mutex clist_lock;
221 222