]> git.karo-electronics.de Git - karo-tx-linux.git/commit
i2c-core: Fix for lockdep validator
authorJean Delvare <khali@linux-fr.org>
Mon, 10 Sep 2012 00:08:48 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 10 Sep 2012 00:10:05 +0000 (10:10 +1000)
commit7b1a7c79087790755ca372a3ae03e9cd204758c4
tree7b59fe57c3842866b0b91db31545aaa63da64e5b
parentf54c96b4210d075005af2d0cd6801e10d1ed0730
i2c-core: Fix for lockdep validator

If kernel is compiled with CONFIG_PROVE_LOCKING the
validator raises an error when a multiplexer is removed
via sysfs and sub-clients are connected to it. This is a
false positive.
Documentation/lockdep-design.txt recommends to handle this
via calls to mutex_lock_nested().

Based on an earlier fix from Michael Lawnick.

Note that the extra code resolves to nothing unless
CONFIG_DEBUG_LOCK_ALLOC=y.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Michael Lawnick <ml.lawnick@gmx.de>
drivers/i2c/i2c-core.c