cpufreq: tegra: fix implementation of ->exit()
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 16 Sep 2013 13:26:40 +0000 (18:56 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 30 Sep 2013 18:18:45 +0000 (20:18 +0200)
->exit() of drivers should call cpufreq_frequency_table_put_attr() if they have
called cpufreq_frequency_table_get_attr() earlier in init() and they aren't
required to validate their cpufreq table in exit by calling
cpufreq_frequency_table_cpuinfo(). Tegra's driver wasn't calling
cpufreq_frequency_table_put_attr() and was calling
cpufreq_frequency_table_cpuinfo() in exit.

Fix both these issues in it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/tegra-cpufreq.c

index d45c1d80125d9f1c2647046660b74b194f9b1015..e0140779b864a512ca150147f3d930ab823a502c 100644 (file)
@@ -232,7 +232,7 @@ 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);
+       cpufreq_frequency_table_put_attr(policy->cpu);
        clk_disable_unprepare(emc_clk);
        return 0;
 }