]> 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 23:41:16 +0000 (09:41 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 10 Sep 2012 23:41:16 +0000 (09:41 +1000)
commit024e30db6e1631d711728f25a136766e20aa6d7f
tree42c4f0a172149d7e6752ddf55284cb1fcb386eec
parenta1319953e2c2b67e995ebcd5ca5829bae99e1fcb
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