Commit 4974b8ea authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

cpufreq: s3cx4xx: use cpufreq_table_validate_and_show()

Lets use cpufreq_table_validate_and_show() instead of calling
cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr().

Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 15cc921b
...@@ -494,12 +494,10 @@ static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy) ...@@ -494,12 +494,10 @@ static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = (500 * 1000) + policy->cpuinfo.transition_latency = (500 * 1000) +
s3c_freq->regulator_latency; s3c_freq->regulator_latency;
ret = cpufreq_frequency_table_cpuinfo(policy, s3c_freq->freq_table); ret = cpufreq_table_validate_and_show(policy, s3c_freq->freq_table);
if (ret) if (ret)
goto err_freq_table; goto err_freq_table;
cpufreq_frequency_table_get_attr(s3c_freq->freq_table, 0);
register_reboot_notifier(&s3c2416_cpufreq_reboot_notifier); register_reboot_notifier(&s3c2416_cpufreq_reboot_notifier);
return 0; return 0;
......
...@@ -386,10 +386,8 @@ static int s3c_cpufreq_init(struct cpufreq_policy *policy) ...@@ -386,10 +386,8 @@ static int s3c_cpufreq_init(struct cpufreq_policy *policy)
/* feed the latency information from the cpu driver */ /* feed the latency information from the cpu driver */
policy->cpuinfo.transition_latency = cpu_cur.info->latency; policy->cpuinfo.transition_latency = cpu_cur.info->latency;
if (ftab) { if (ftab)
cpufreq_frequency_table_cpuinfo(policy, ftab); return cpufreq_table_validate_and_show(policy, ftab);
cpufreq_frequency_table_get_attr(ftab, policy->cpu);
}
return 0; return 0;
} }
......
...@@ -251,15 +251,12 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy) ...@@ -251,15 +251,12 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
*/ */
policy->cpuinfo.transition_latency = (500 * 1000) + regulator_latency; policy->cpuinfo.transition_latency = (500 * 1000) + regulator_latency;
ret = cpufreq_frequency_table_cpuinfo(policy, s3c64xx_freq_table); ret = cpufreq_table_validate_and_show(policy, s3c64xx_freq_table);
if (ret != 0) { if (ret != 0) {
pr_err("Failed to configure frequency table: %d\n", pr_err("Failed to configure frequency table: %d\n",
ret); ret);
regulator_put(vddarm); regulator_put(vddarm);
clk_put(armclk); clk_put(armclk);
} else {
cpufreq_frequency_table_get_attr(s3c64xx_freq_table,
policy->cpu);
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment