Commit 95d69695 authored by Viresh Kumar's avatar Viresh Kumar Committed by Zhihong Yu
Browse files

UPSTREAM: cpufreq: kryo: Release OPP tables on module removal



Commit 5ad7346b ("cpufreq: kryo: Add module remove and exit") made
it possible to build the kryo cpufreq driver as a module, but it failed
to release all the resources, i.e. OPP tables, when the module is
unloaded.

This patch fixes it by releasing the OPP tables, by calling
dev_pm_opp_put_supported_hw() for them, from the
qcom_cpufreq_kryo_remove() routine. The array of pointers to the OPP
tables is also allocated dynamically now in qcom_cpufreq_kryo_probe(),
as the pointers will be required while releasing the resources.

Compile tested only.

Cc: 4.18+ <stable@vger.kernel.org> # v4.18+
Fixes: 5ad7346b ("cpufreq: kryo: Add module remove and exit")
Reviewed-by: default avatarGeorgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
(cherry picked from commit 0334906c
https://github.com/torvalds/linux.git

)
Signed-off-by: default avatarNiklas Cassel <niklas.cassel@linaro.org>

BUG=b:129558664
TEST=Validate DVFS and schedutil governor
Git-repo: https://git.linaro.org/people/niklas.cassel/kernel.git


Git-commit: 19b6e0e26260a8fe2d670fae38c827e3f317b319
Signed-off-by: default avatarPraveen Koya <pkoya@codeaurora.org>

Change-Id: I2c8adab0cf0db9a2c078574d6b695b840c0728d3
Signed-off-by: default avatarVamsi Singamsetty <vamssi@codeaurora.org>
Signed-off-by: default avatarKhasim Syed Mohammed <khasim.mohammed@linaro.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1664370


Reviewed-by: default avatarZhihong Yu <zhihongyu@chromium.org>
Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Commit-Queue: Zhihong Yu <zhihongyu@chromium.org>
Tested-by: default avatarZhihong Yu <zhihongyu@chromium.org>
parent 811c4548
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment