opp: Make _set_opp_custom() work without regulators
authorDmitry Osipenko <digetx@gmail.com>
Wed, 20 Jan 2021 22:26:49 +0000 (01:26 +0300)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 2 Feb 2021 04:57:43 +0000 (10:27 +0530)
commit04b447df1d098dcd7d133203a310a6d415875547
treee95c1618a7fbaaea8f9082770c631c4a000902bd
parent38bb34393804b79eff647bdf96762db5efce392c
opp: Make _set_opp_custom() work without regulators

Check whether OPP table has regulators in _set_opp_custom() and set up
dev_pm_set_opp_data accordingly. Now _set_opp_custom() works properly,
i.e. it doesn't crash if OPP table doesn't have assigned regulators.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
[ Viresh: Rearrange the routine a bit ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c