cpufreq: s3cx4xx: use cpufreq_table_validate_and_show()
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 16 Sep 2013 13:26:30 +0000 (18:56 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 30 Sep 2013 18:18:44 +0000 (20:18 +0200)
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: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/s3c2416-cpufreq.c
drivers/cpufreq/s3c24xx-cpufreq.c
drivers/cpufreq/s3c64xx-cpufreq.c

index 22dcb81ef9d0e9069b8fc4d49249713d59d41dd9..a7a4c612d156bdca7a5b64facfa223da842bd614 100644 (file)
@@ -494,12 +494,10 @@ static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
        policy->cpuinfo.transition_latency = (500 * 1000) +
                                             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)
                goto err_freq_table;
 
-       cpufreq_frequency_table_get_attr(s3c_freq->freq_table, 0);
-
        register_reboot_notifier(&s3c2416_cpufreq_reboot_notifier);
 
        return 0;
index f2c872c7bbb2c8786e54450918c366fb9d3aaeca..73856d1d4d4004ae6ec98f2f5bd7284a12773c59 100644 (file)
@@ -386,10 +386,8 @@ static int s3c_cpufreq_init(struct cpufreq_policy *policy)
        /* feed the latency information from the cpu driver */
        policy->cpuinfo.transition_latency = cpu_cur.info->latency;
 
-       if (ftab) {
-               cpufreq_frequency_table_cpuinfo(policy, ftab);
-               cpufreq_frequency_table_get_attr(ftab, policy->cpu);
-       }
+       if (ftab)
+               return cpufreq_table_validate_and_show(policy, ftab);
 
        return 0;
 }
index 90240436e3b818f68313645acc04f67a3461fd11..872f74dd401abde8e9406d19708d8d0322b7c0d6 100644 (file)
@@ -251,15 +251,12 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
         */
        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) {
                pr_err("Failed to configure frequency table: %d\n",
                       ret);
                regulator_put(vddarm);
                clk_put(armclk);
-       } else {
-               cpufreq_frequency_table_get_attr(s3c64xx_freq_table,
-                               policy->cpu);
        }
 
        return ret;