From: Michał Mirosław Date: Mon, 10 Aug 2020 04:33:32 +0000 (+0200) Subject: regulator: don't require mutex for regulator_notifier_call_chain() X-Git-Tag: v5.10.7~1142^2~34^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3bca239d6184df61a619d78764e0481242d844b4;p=platform%2Fkernel%2Flinux-rpi.git regulator: don't require mutex for regulator_notifier_call_chain() Since 3801b86aa482 ("regulator: Refactor supply implementation to work as regular consumers") we no longer cascade notifications and so notifier head's built-in rwsem is enough to protect the notifier chain. Remove the requirement to fix one case where rdev->mutex might be forced to be taken recursively. Signed-off-by: Michał Mirosław Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/5a0da9017c69a4dbc3f9b50f44476fce80a73387.1597032945.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 07edbd8e..2ed0351 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -4725,14 +4725,11 @@ EXPORT_SYMBOL_GPL(regulator_bulk_free); * @data: callback-specific data. * * Called by regulator drivers to notify clients a regulator event has - * occurred. We also notify regulator clients downstream. - * Note lock must be held by caller. + * occurred. */ int regulator_notifier_call_chain(struct regulator_dev *rdev, unsigned long event, void *data) { - lockdep_assert_held_once(&rdev->mutex.base); - _notifier_call_chain(rdev, event, data); return NOTIFY_DONE;