]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: Add lockdep asserts to help detecting locking misuse
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Mon, 29 Jun 2015 00:04:43 +0000 (09:04 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jul 2015 20:56:15 +0000 (21:56 +0100)
commit01c23fbe0195b5c53607e7e87cc03a51c88b52a3
tree8a14818c039a853bb3c314915a7f2e6e735d211c
parent0c9e0229f3c4e023815b9350b2095fd8ad5809e3
regulator: Add lockdep asserts to help detecting locking misuse

Add lockdep_assert_held_once() to functions explicitly mentioning that
rdev or regulator_list mutex must be held. Using WARN_ONCE shouldn't
pollute the dmesg to much.

The patch (if CONFIG_LOCKDEP enabled) will show warnings in certain
regulators calling regulator_notifier_call_chain() without rdev->mutex
held.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c