diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2014-11-25 16:04:20 +0530 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-02 00:01:24 +0100 |
commit | 493b4cd285e68d8d8d5853a2536ea06f8cabeaeb (patch) | |
tree | 1bfd16d752e91131fdb009c87a53f73bbf8b6882 /drivers/cpufreq/arm_big_little.c | |
parent | cc87b8a8e94d840863334151f3525fd286c9ae23 (diff) | |
download | op-kernel-dev-493b4cd285e68d8d8d5853a2536ea06f8cabeaeb.zip op-kernel-dev-493b4cd285e68d8d8d5853a2536ea06f8cabeaeb.tar.gz |
cpufreq: arm_big_little: free OPP table created during ->init()
OPP layer now supports freeing of OPPs and we should free them once they aren't
useful anymore.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/arm_big_little.c')
-rw-r--r-- | drivers/cpufreq/arm_big_little.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index a46c223..e1a6ba6 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -289,6 +289,8 @@ static void _put_cluster_clk_and_freq_table(struct device *cpu_dev) clk_put(clk[cluster]); dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table[cluster]); + if (arm_bL_ops->free_opp_table) + arm_bL_ops->free_opp_table(cpu_dev); dev_dbg(cpu_dev, "%s: cluster: %d\n", __func__, cluster); } @@ -337,7 +339,7 @@ static int _get_cluster_clk_and_freq_table(struct device *cpu_dev) if (ret) { dev_err(cpu_dev, "%s: failed to init cpufreq table, cpu: %d, err: %d\n", __func__, cpu_dev->id, ret); - goto out; + goto free_opp_table; } name[12] = cluster + '0'; @@ -354,6 +356,9 @@ static int _get_cluster_clk_and_freq_table(struct device *cpu_dev) ret = PTR_ERR(clk[cluster]); dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table[cluster]); +free_opp_table: + if (arm_bL_ops->free_opp_table) + arm_bL_ops->free_opp_table(cpu_dev); out: dev_err(cpu_dev, "%s: Failed to get data for cluster: %d\n", __func__, cluster); |