From e9c142b0d2c08178a9e146d47d8fe397373bda3e Mon Sep 17 00:00:00 2001 From: Michał Mirosław Date: Mon, 10 Aug 2020 06:33:32 +0200 Subject: regulator: remove locking around regulator_notifier_call_chain() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Adam Thomson Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/42393f66dcc4d80dcd9797be45216b4035aa96cb.1597032945.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown --- drivers/regulator/ltc3589.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'drivers/regulator/ltc3589.c') diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c index fa563aacf742..38f7ccb63b52 100644 --- a/drivers/regulator/ltc3589.c +++ b/drivers/regulator/ltc3589.c @@ -357,22 +357,16 @@ static irqreturn_t ltc3589_isr(int irq, void *dev_id) if (irqstat & LTC3589_IRQSTAT_THERMAL_WARN) { event = REGULATOR_EVENT_OVER_TEMP; - for (i = 0; i < LTC3589_NUM_REGULATORS; i++) { - regulator_lock(ltc3589->regulators[i]); + for (i = 0; i < LTC3589_NUM_REGULATORS; i++) regulator_notifier_call_chain(ltc3589->regulators[i], event, NULL); - regulator_unlock(ltc3589->regulators[i]); - } } if (irqstat & LTC3589_IRQSTAT_UNDERVOLT_WARN) { event = REGULATOR_EVENT_UNDER_VOLTAGE; - for (i = 0; i < LTC3589_NUM_REGULATORS; i++) { - regulator_lock(ltc3589->regulators[i]); + for (i = 0; i < LTC3589_NUM_REGULATORS; i++) regulator_notifier_call_chain(ltc3589->regulators[i], event, NULL); - regulator_unlock(ltc3589->regulators[i]); - } } /* Clear warning condition */ -- cgit v1.2.3