diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-04-01 08:57:48 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-04-02 09:26:32 -0400 |
commit | eb2f50ff93f08c8001d0d7e1148948ba80989aaf (patch) | |
tree | 8e598c3c7e47ce6c79e98a9d2eb91e7e555ee61f /arch/arm/mach-davinci | |
parent | 8a00627a187dca212c43a511852f06dd2c94b9aa (diff) |
cpufreq: drivers: Remove unnecessary assignments of policy-> members
Some assignments of policy-> min/max/cur/cpuinfo.min_freq/cpuinfo.max_freq
aren't required as part of it is done by cpufreq driver or cpufreq core.
Remove them.
At some places we merge multiple lines together too.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r-- | arch/arm/mach-davinci/cpufreq.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c index 8fb0c2ac227e..7c2e943c5500 100644 --- a/arch/arm/mach-davinci/cpufreq.c +++ b/arch/arm/mach-davinci/cpufreq.c | |||
@@ -137,21 +137,16 @@ static int davinci_cpu_init(struct cpufreq_policy *policy) | |||
137 | return result; | 137 | return result; |
138 | } | 138 | } |
139 | 139 | ||
140 | policy->cur = policy->min = policy->max = davinci_getspeed(0); | 140 | policy->cur = davinci_getspeed(0); |
141 | 141 | ||
142 | if (freq_table) { | 142 | result = cpufreq_frequency_table_cpuinfo(policy, freq_table); |
143 | result = cpufreq_frequency_table_cpuinfo(policy, freq_table); | 143 | if (result) { |
144 | if (!result) | 144 | pr_err("%s: cpufreq_frequency_table_cpuinfo() failed", |
145 | cpufreq_frequency_table_get_attr(freq_table, | 145 | __func__); |
146 | policy->cpu); | 146 | return result; |
147 | } else { | ||
148 | policy->cpuinfo.min_freq = policy->min; | ||
149 | policy->cpuinfo.max_freq = policy->max; | ||
150 | } | 147 | } |
151 | 148 | ||
152 | policy->min = policy->cpuinfo.min_freq; | 149 | cpufreq_frequency_table_get_attr(freq_table, policy->cpu); |
153 | policy->max = policy->cpuinfo.max_freq; | ||
154 | policy->cur = davinci_getspeed(0); | ||
155 | 150 | ||
156 | /* | 151 | /* |
157 | * Time measurement across the target() function yields ~1500-1800us | 152 | * Time measurement across the target() function yields ~1500-1800us |