]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
cpufreq: sparc: use cpufreq_table_validate_and_show()
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 16 Sep 2013 13:26:36 +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: David S. Miller <davem@davemloft.net>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/sparc-us2e-cpufreq.c
drivers/cpufreq/sparc-us3-cpufreq.c

index 63b3eae5ffdc6578c544ad0d4cb757357e642599..8db0c1890c925b8efb89daf0369997a08d61f44d 100644 (file)
@@ -307,7 +307,6 @@ static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy)
        unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000;
        struct cpufreq_frequency_table *table =
                &us2e_freq_table[cpu].table[0];
-       int ret;
 
        table[0].driver_data = 0;
        table[0].frequency = clock_tick / 1;
@@ -325,10 +324,7 @@ static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy)
        policy->cpuinfo.transition_latency = 0;
        policy->cur = clock_tick;
 
-       ret = cpufreq_frequency_table_cpuinfo(policy, table);
-       if (!ret)
-               cpufreq_frequency_table_get_attr(table, policy->cpu);
-       return ret;
+       return cpufreq_table_validate_and_show(policy, table);
 }
 
 static int us2e_freq_cpu_exit(struct cpufreq_policy *policy)
index 985bc56b0068896d64be1b1fdd3cf0dc4a76c140..120a2df2bc70a5bed84d1bd929f1b401b5809119 100644 (file)
@@ -168,7 +168,6 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy)
        unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000;
        struct cpufreq_frequency_table *table =
                &us3_freq_table[cpu].table[0];
-       int ret;
 
        table[0].driver_data = 0;
        table[0].frequency = clock_tick / 1;
@@ -182,11 +181,7 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy)
        policy->cpuinfo.transition_latency = 0;
        policy->cur = clock_tick;
 
-       ret = cpufreq_frequency_table_cpuinfo(policy, table);
-       if (!ret)
-               cpufreq_frequency_table_get_attr(table, policy->cpu);
-
-       return ret;
+       return cpufreq_table_validate_and_show(policy, table);
 }
 
 static int us3_freq_cpu_exit(struct cpufreq_policy *policy)