aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/da9211-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-09-07 18:49:14 +0100
committerMark Brown <broonie@kernel.org>2020-09-07 18:49:14 +0100
commit567444fbddf5674895e1b69eabfc34ea31725bbe (patch)
tree17af47b5aa2ee77d1c7ff29a838c868b7e79b0d7 /drivers/regulator/da9211-regulator.c
parentregulator: lochnagar: Add additional VDDCORE range (diff)
parentregulator: remove locking around regulator_notifier_call_chain() (diff)
downloadlinux-dev-567444fbddf5674895e1b69eabfc34ea31725bbe.tar.xz
linux-dev-567444fbddf5674895e1b69eabfc34ea31725bbe.zip
Merge series "regulator: unexport regulator_lock/unlock()" from Michał Mirosław <mirq-linux@rere.qmqm.pl>:
This removes regulator_lock/unlock() calls around regulator_notifier_call_chain() as they are redundant - drivers already have to guarantee regulator_dev's existence during the call. This should make reasoing about the lock easier, as this was the only use outside regulator core code. The only client that needed recursive locking from the notifier chain was drivers/usb/host/ohci-da8xx.c, which responds to over-current notification by calling regulator_disable(). Michał Mirosław (3): regulator: don't require mutex for regulator_notifier_call_chain() regulator: remove locking around regulator_notifier_call_chain() regulator: unexport regulator_lock/unlock() drivers/regulator/core.c | 11 +++-------- drivers/regulator/da9055-regulator.c | 2 -- drivers/regulator/da9062-regulator.c | 2 -- drivers/regulator/da9063-regulator.c | 2 -- drivers/regulator/da9210-regulator.c | 4 ---- drivers/regulator/da9211-regulator.c | 4 ---- drivers/regulator/lp8755.c | 6 ------ drivers/regulator/ltc3589.c | 10 ++-------- drivers/regulator/ltc3676.c | 10 ++-------- drivers/regulator/pv88060-regulator.c | 10 ++-------- drivers/regulator/pv88080-regulator.c | 10 ++-------- drivers/regulator/pv88090-regulator.c | 10 ++-------- drivers/regulator/slg51000-regulator.c | 4 ---- drivers/regulator/stpmic1_regulator.c | 4 ---- drivers/regulator/wm831x-dcdc.c | 4 ---- drivers/regulator/wm831x-isink.c | 2 -- drivers/regulator/wm831x-ldo.c | 2 -- drivers/regulator/wm8350-regulator.c | 2 -- include/linux/regulator/driver.h | 3 --- 19 files changed, 13 insertions(+), 89 deletions(-) -- 2.20.1
Diffstat (limited to 'drivers/regulator/da9211-regulator.c')
-rw-r--r--drivers/regulator/da9211-regulator.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c
index cffcefd0538d..e01b32d1fa17 100644
--- a/drivers/regulator/da9211-regulator.c
+++ b/drivers/regulator/da9211-regulator.c
@@ -346,10 +346,8 @@ static irqreturn_t da9211_irq_handler(int irq, void *data)
goto error_i2c;
if (reg_val & DA9211_E_OV_CURR_A) {
- regulator_lock(chip->rdev[0]);
regulator_notifier_call_chain(chip->rdev[0],
REGULATOR_EVENT_OVER_CURRENT, NULL);
- regulator_unlock(chip->rdev[0]);
err = regmap_write(chip->regmap, DA9211_REG_EVENT_B,
DA9211_E_OV_CURR_A);
@@ -360,10 +358,8 @@ static irqreturn_t da9211_irq_handler(int irq, void *data)
}
if (reg_val & DA9211_E_OV_CURR_B) {
- regulator_lock(chip->rdev[1]);
regulator_notifier_call_chain(chip->rdev[1],
REGULATOR_EVENT_OVER_CURRENT, NULL);
- regulator_unlock(chip->rdev[1]);
err = regmap_write(chip->regmap, DA9211_REG_EVENT_B,
DA9211_E_OV_CURR_B);