i2c: Add support for nested i2c bus locking
authorJiri Kosina <jikos@jikos.cz>
Sun, 10 Dec 2006 20:21:30 +0000 (21:21 +0100)
committerJean Delvare <khali@arrakis.delvare>
Sun, 10 Dec 2006 20:21:30 +0000 (21:21 +0100)
commit6ea23039cb1cc7c379eb5fba0ed2c53291e9bea7
treec22887d242a0c3813789c63c4db2fd59b1f3ef7e
parentad04d5c3879dcf79ba0fa1826eab991f7b7a2de8
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>
drivers/i2c/i2c-core.c
include/linux/i2c.h