regulator: core: Fast path non-deferred disables
PATCH 1/1 regulator: core: Fast path non-deferred disables
Users (especially framework code) may end up passing in a zero deferral time depending on runtime conditions or configuration. If they do then just call regulator_disable() directly to save scheduling.
Signed-off-by Mark Brown <[email protected]>
--- drivers/regulator/core.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/regulator/core.c +3 -0
@@ -1749,6 +1749,9 @@ int regulator_disable_deferred(struct regulator *regulator, int ms)if (regulator->always_on)return 0 ; +if (!ms) +return regulator_disable (regulator); +mutex_lock (&rdev->mutex); rdev->deferred_disables++;mutex_unlock (&rdev->mutex);
Signature · 1 line
1.7.10.4
Quoted 5 lines · Mark Brown
Users (especially framework code) may end up passing in a zero deferral time depending on runtime conditions or configuration. If they do then just call
regulator_disable()directly to save scheduling.Signed-off-by Mark Brown <[email protected]>
Acked-by Liam Girdwood <[email protected]>