diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2018-11-18 22:56:17 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-11-19 13:33:17 +0100 |
commit | f8702f9e4aa7b45131af3df5531d6e3835269141 (patch) | |
tree | 60c485ee3dac05b6eca89f5dc4f6058d84badfd0 /drivers/regulator/da9210-regulator.c | |
parent | regulator: core: Decouple regulators on regulator_unregister() (diff) | |
download | linux-f8702f9e4aa7b45131af3df5531d6e3835269141.tar.xz linux-f8702f9e4aa7b45131af3df5531d6e3835269141.zip |
regulator: core: Use ww_mutex for regulators locking
Wait/wound mutex shall be used in order to avoid lockups on locking of
coupled regulators.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Suggested-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/da9210-regulator.c')
-rw-r--r-- | drivers/regulator/da9210-regulator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c index d0496d6b0934..84dba64ed11e 100644 --- a/drivers/regulator/da9210-regulator.c +++ b/drivers/regulator/da9210-regulator.c @@ -131,7 +131,7 @@ static irqreturn_t da9210_irq_handler(int irq, void *data) if (error < 0) goto error_i2c; - mutex_lock(&chip->rdev->mutex); + regulator_lock(chip->rdev); if (val & DA9210_E_OVCURR) { regulator_notifier_call_chain(chip->rdev, @@ -157,7 +157,7 @@ static irqreturn_t da9210_irq_handler(int irq, void *data) handled |= DA9210_E_VMAX; } - mutex_unlock(&chip->rdev->mutex); + regulator_unlock(chip->rdev); if (handled) { /* Clear handled events */ |