
The commit 4fcba5d556b4 ("regulator: implement basic reference counter") have made it more important to keep fixed/gpio regulators enable/disable state in balance.
The regulator_set_enable_if_allowed function is more relaxed and will wrap all cases where the regulator is busy, already active, missing or if DM_REGULATOR is not enabled.
These patches are an expansion of similar Jonas Karlman's patches.
--- Changes from v2: - no changes, re-sending
Changes from v1: - check return of regulator_set_enable_if_allowed for -ENOSYS to avoid error caused by disabled DM_REGULATOR (Jonas Karlman suggestion) ---
Svyatoslav Ryhel (3): video: pwm_backlight: use regulator_set_enable_if_allowed video: simple_panel: use regulator_set_enable_if_allowed video: tegra20: dsi: use regulator_set_enable_if_allowed
drivers/video/pwm_backlight.c | 13 ++++++------- drivers/video/simple_panel.c | 10 +++++----- drivers/video/tegra20/tegra-dsi.c | 8 +++----- 3 files changed, 14 insertions(+), 17 deletions(-)