aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/ltc3676.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2020-08-10 06:33:32 +0200
committerMark Brown <broonie@kernel.org>2020-09-07 18:35:25 +0100
commite9c142b0d2c08178a9e146d47d8fe397373bda3e (patch)
tree02f3ef2859f7d0e6cae992c3c340f6ce636c897a /drivers/regulator/ltc3676.c
parentregulator: don't require mutex for regulator_notifier_call_chain() (diff)
downloadlinux-dev-e9c142b0d2c08178a9e146d47d8fe397373bda3e.tar.xz
linux-dev-e9c142b0d2c08178a9e146d47d8fe397373bda3e.zip
regulator: remove locking around regulator_notifier_call_chain()
regulator_notifier_call_chain() doesn't need rdev lock and rdev's existence is assumed in the code anyway. Remove the locks from drivers. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/42393f66dcc4d80dcd9797be45216b4035aa96cb.1597032945.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/ltc3676.c')
-rw-r--r--drivers/regulator/ltc3676.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/regulator/ltc3676.c b/drivers/regulator/ltc3676.c
index 557727b54f0e..eb3d6bed6d54 100644
--- a/drivers/regulator/ltc3676.c
+++ b/drivers/regulator/ltc3676.c
@@ -276,23 +276,17 @@ static irqreturn_t ltc3676_isr(int irq, void *dev_id)
if (irqstat & LTC3676_IRQSTAT_THERMAL_WARN) {
dev_warn(dev, "Over-temperature Warning\n");
event = REGULATOR_EVENT_OVER_TEMP;
- for (i = 0; i < LTC3676_NUM_REGULATORS; i++) {
- regulator_lock(ltc3676->regulators[i]);
+ for (i = 0; i < LTC3676_NUM_REGULATORS; i++)
regulator_notifier_call_chain(ltc3676->regulators[i],
event, NULL);
- regulator_unlock(ltc3676->regulators[i]);
- }
}
if (irqstat & LTC3676_IRQSTAT_UNDERVOLT_WARN) {
dev_info(dev, "Undervoltage Warning\n");
event = REGULATOR_EVENT_UNDER_VOLTAGE;
- for (i = 0; i < LTC3676_NUM_REGULATORS; i++) {
- regulator_lock(ltc3676->regulators[i]);
+ for (i = 0; i < LTC3676_NUM_REGULATORS; i++)
regulator_notifier_call_chain(ltc3676->regulators[i],
event, NULL);
- regulator_unlock(ltc3676->regulators[i]);
- }
}
/* Clear warning condition */