diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2020-08-10 06:33:32 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-07 18:35:25 +0100 |
commit | e9c142b0d2c08178a9e146d47d8fe397373bda3e (patch) | |
tree | 02f3ef2859f7d0e6cae992c3c340f6ce636c897a /drivers/regulator/pv88080-regulator.c | |
parent | 3bca239d6184df61a619d78764e0481242d844b4 (diff) | |
download | linux-e9c142b0d2c08178a9e146d47d8fe397373bda3e.tar.gz linux-e9c142b0d2c08178a9e146d47d8fe397373bda3e.tar.bz2 linux-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/pv88080-regulator.c')
-rw-r--r-- | drivers/regulator/pv88080-regulator.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/regulator/pv88080-regulator.c b/drivers/regulator/pv88080-regulator.c index a444f68af1a8..2a74cc05acfe 100644 --- a/drivers/regulator/pv88080-regulator.c +++ b/drivers/regulator/pv88080-regulator.c @@ -334,13 +334,10 @@ static irqreturn_t pv88080_irq_handler(int irq, void *data) if (reg_val & PV88080_E_VDD_FLT) { for (i = 0; i < PV88080_MAX_REGULATORS; i++) { - if (chip->rdev[i] != NULL) { - regulator_lock(chip->rdev[i]); + if (chip->rdev[i] != NULL) regulator_notifier_call_chain(chip->rdev[i], REGULATOR_EVENT_UNDER_VOLTAGE, NULL); - regulator_unlock(chip->rdev[i]); - } } err = regmap_write(chip->regmap, PV88080_REG_EVENT_A, @@ -353,13 +350,10 @@ static irqreturn_t pv88080_irq_handler(int irq, void *data) if (reg_val & PV88080_E_OVER_TEMP) { for (i = 0; i < PV88080_MAX_REGULATORS; i++) { - if (chip->rdev[i] != NULL) { - regulator_lock(chip->rdev[i]); + if (chip->rdev[i] != NULL) regulator_notifier_call_chain(chip->rdev[i], REGULATOR_EVENT_OVER_TEMP, NULL); - regulator_unlock(chip->rdev[i]); - } } err = regmap_write(chip->regmap, PV88080_REG_EVENT_A, |