opp: Reuse the enabled flag in !target_freq path
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 13 Aug 2020 03:08:37 +0000 (08:38 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 24 Aug 2020 11:34:31 +0000 (17:04 +0530)
commit10b217365b9454bc5f31d2801148fdf04939f431
tree639d54acd8eb5102155b08d491d79cfae76803b9
parent72f80ce4ef9b756185aab5f1955d8352b6021fba
opp: Reuse the enabled flag in !target_freq path

The OPP core needs to track if the resources of devices are
enabled/configured or not, as it disables the resources when target_freq
is set to 0.

Handle that with the new enabled flag and remove otherwise complex
conditional statements.

Tested-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c