opp: Reduce code duplication in _set_required_opps()
authorStephan Gerhold <stephan@gerhold.net>
Thu, 30 Jul 2020 08:01:44 +0000 (10:01 +0200)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 16 Sep 2020 08:32:33 +0000 (14:02 +0530)
commit60cdeae0d627eca4ae616e3097a1f00ac9f3d704
tree690a7c5b735572483d1a2ed3c195bba086fbf9ac
parent475ac8ead803e8c3a8f492e3129b1a19d7e2efd7
opp: Reduce code duplication in _set_required_opps()

Move call to dev_pm_genpd_set_performance_state() to a separate
function so we can avoid duplicating the code for the single and
multiple genpd case.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
[ Viresh: Validate virtual device before use ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c