diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-09-30 16:05:42 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-10-01 12:28:42 +0100 |
commit | 9f01cd4a915e13dda6a61b989229015687ffd58f (patch) | |
tree | 4dda333498397cf701528f22802f43001c1d416c /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) |
regulator: core: introduce function to lock regulators and its supplies
Each regulator_dev is locked with its own mutex. This is fine as long
as only one regulator_dev is locked, but makes lockdep unhappy when we
have to walk up the supply chain like it can happen in
regulator_get_voltage:
regulator_get_voltage ->
mutex_lock(®ulator->rdev->mutex) ->
_regulator_get_voltage(regulator->rdev) ->
regulator_get_voltage(rdev->supply) ->
mutex_lock(®ulator->rdev->mutex);
This causes lockdep to issue a possible deadlock warning.
There are at least two ways to work around this:
- We can always lock the whole supply chain using the functions
introduced with this patch.
- We could store the current voltage in struct regulator_rdev so
that we do not have to walk up the supply chain for the
_regulator_get_voltage case.
Anyway, regulator_lock_supply/regulator_unlock_supply will be needed
once we allow regulator_set_voltage to optimize the supply voltages.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions