diff mbox

[35/35] cpufreq: tegra: use cpufreq_table_validate_and_show()

Message ID 568f3dbd414b050bb2319d960fb5044a5aed8ee3.1375964117.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Aug. 8, 2013, 1:48 p.m. UTC
Lets use cpufreq_table_validate_and_show() instead of calling
cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr().

Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/tegra-cpufreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Stephen Warren Aug. 8, 2013, 3:44 p.m. UTC | #1
On 08/08/2013 07:48 AM, Viresh Kumar wrote:
> Lets use cpufreq_table_validate_and_show() instead of calling
> cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr().

Assuming the new function simply does what the two removed lines do,
this looks fine to me.

>  static int tegra_cpu_exit(struct cpufreq_policy *policy)
>  {
> -	cpufreq_frequency_table_cpuinfo(policy, freq_table);

This doesn't seem to be mentioned in the commit description. I assume
this is simply dead/useless code removal?
Viresh Kumar Aug. 8, 2013, 4:07 p.m. UTC | #2
On 8 August 2013 21:14, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 08/08/2013 07:48 AM, Viresh Kumar wrote:
>> Lets use cpufreq_table_validate_and_show() instead of calling
>> cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr().
>
> Assuming the new function simply does what the two removed lines do,
> this looks fine to me.

http://lkml.org/lkml/2013/8/8/266

>>  static int tegra_cpu_exit(struct cpufreq_policy *policy)
>>  {
>> -     cpufreq_frequency_table_cpuinfo(policy, freq_table);
>
> This doesn't seem to be mentioned in the commit description. I assume
> this is simply dead/useless code removal?

Its useless and the correct routine isn't called at all :) .. I will add that
additional patch and send it to you and will get this change out of this
commit.
diff mbox

Patch

diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
index cd66b85..b50d2c4 100644
--- a/drivers/cpufreq/tegra-cpufreq.c
+++ b/drivers/cpufreq/tegra-cpufreq.c
@@ -215,8 +215,7 @@  static int tegra_cpu_init(struct cpufreq_policy *policy)
 	clk_prepare_enable(emc_clk);
 	clk_prepare_enable(cpu_clk);
 
-	cpufreq_frequency_table_cpuinfo(policy, freq_table);
-	cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
+	cpufreq_table_validate_and_show(policy, freq_table);
 	policy->cur = tegra_getspeed(policy->cpu);
 	target_cpu_speed[policy->cpu] = policy->cur;
 
@@ -233,7 +232,6 @@  static int tegra_cpu_init(struct cpufreq_policy *policy)
 
 static int tegra_cpu_exit(struct cpufreq_policy *policy)
 {
-	cpufreq_frequency_table_cpuinfo(policy, freq_table);
 	clk_disable_unprepare(emc_clk);
 	return 0;
 }