• Viresh Kumar's avatar
    cpufreq: kryo: Release OPP tables on module removal · 0334906c
    Viresh Kumar authored
    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>
    0334906c
qcom-cpufreq-kryo.c 5.87 KB