summaryrefslogtreecommitdiff
path: root/drivers/regulator/da9210-regulator.c
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2018-11-19 00:56:17 +0300
committerMark Brown <broonie@kernel.org>2018-11-19 12:33:17 +0000
commitf8702f9e4aa7b45131af3df5531d6e3835269141 (patch)
tree60c485ee3dac05b6eca89f5dc4f6058d84badfd0 /drivers/regulator/da9210-regulator.c
parent6303f3e78b6fd3f84dbe7f2fa4f108d47061d1fb (diff)
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.c4
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 */