mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-19 21:54:04 +00:00
regulator: don't require mutex for regulator_notifier_call_chain()
Since 3801b86aa4
("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 <mirq-linux@rere.qmqm.pl>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/5a0da9017c69a4dbc3f9b50f44476fce80a73387.1597032945.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6656d4462c
commit
3bca239d61
1 changed files with 1 additions and 4 deletions
|
@ -4725,14 +4725,11 @@ EXPORT_SYMBOL_GPL(regulator_bulk_free);
|
||||||
* @data: callback-specific data.
|
* @data: callback-specific data.
|
||||||
*
|
*
|
||||||
* Called by regulator drivers to notify clients a regulator event has
|
* Called by regulator drivers to notify clients a regulator event has
|
||||||
* occurred. We also notify regulator clients downstream.
|
* occurred.
|
||||||
* Note lock must be held by caller.
|
|
||||||
*/
|
*/
|
||||||
int regulator_notifier_call_chain(struct regulator_dev *rdev,
|
int regulator_notifier_call_chain(struct regulator_dev *rdev,
|
||||||
unsigned long event, void *data)
|
unsigned long event, void *data)
|
||||||
{
|
{
|
||||||
lockdep_assert_held_once(&rdev->mutex.base);
|
|
||||||
|
|
||||||
_notifier_call_chain(rdev, event, data);
|
_notifier_call_chain(rdev, event, data);
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue