diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2018-11-19 00:56:17 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-11-19 15:33:17 +0300 |
commit | f8702f9e4aa7b45131af3df5531d6e3835269141 (patch) | |
tree | 60c485ee3dac05b6eca89f5dc4f6058d84badfd0 /drivers/regulator/stpmic1_regulator.c | |
parent | 6303f3e78b6fd3f84dbe7f2fa4f108d47061d1fb (diff) | |
download | linux-f8702f9e4aa7b45131af3df5531d6e3835269141.tar.xz |
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/stpmic1_regulator.c')
-rw-r--r-- | drivers/regulator/stpmic1_regulator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c index e15634edb8ce..eac0848a78c7 100644 --- a/drivers/regulator/stpmic1_regulator.c +++ b/drivers/regulator/stpmic1_regulator.c @@ -489,14 +489,14 @@ static irqreturn_t stpmic1_curlim_irq_handler(int irq, void *data) { struct regulator_dev *rdev = (struct regulator_dev *)data; - mutex_lock(&rdev->mutex); + regulator_lock(rdev, NULL); /* Send an overcurrent notification */ regulator_notifier_call_chain(rdev, REGULATOR_EVENT_OVER_CURRENT, NULL); - mutex_unlock(&rdev->mutex); + regulator_unlock(rdev); return IRQ_HANDLED; } |