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/sh/kernel | |
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/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cpufreq.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/sh/kernel/cpufreq.c b/arch/sh/kernel/cpufreq.c index 0fdf64b759c8..88c8feedf785 100644 --- a/arch/sh/kernel/cpufreq.c +++ b/arch/sh/kernel/cpufreq.c | |||
@@ -116,7 +116,7 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
116 | return PTR_ERR(cpuclk); | 116 | return PTR_ERR(cpuclk); |
117 | } | 117 | } |
118 | 118 | ||
119 | policy->cur = policy->min = policy->max = sh_cpufreq_get(cpu); | 119 | policy->cur = sh_cpufreq_get(cpu); |
120 | 120 | ||
121 | freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL; | 121 | freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL; |
122 | if (freq_table) { | 122 | if (freq_table) { |
@@ -129,15 +129,12 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
129 | dev_notice(dev, "no frequency table found, falling back " | 129 | dev_notice(dev, "no frequency table found, falling back " |
130 | "to rate rounding.\n"); | 130 | "to rate rounding.\n"); |
131 | 131 | ||
132 | policy->cpuinfo.min_freq = | 132 | policy->min = policy->cpuinfo.min_freq = |
133 | (clk_round_rate(cpuclk, 1) + 500) / 1000; | 133 | (clk_round_rate(cpuclk, 1) + 500) / 1000; |
134 | policy->cpuinfo.max_freq = | 134 | policy->max = policy->cpuinfo.max_freq = |
135 | (clk_round_rate(cpuclk, ~0UL) + 500) / 1000; | 135 | (clk_round_rate(cpuclk, ~0UL) + 500) / 1000; |
136 | } | 136 | } |
137 | 137 | ||
138 | policy->min = policy->cpuinfo.min_freq; | ||
139 | policy->max = policy->cpuinfo.max_freq; | ||
140 | |||
141 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 138 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
142 | 139 | ||
143 | dev_info(dev, "CPU Frequencies - Minimum %u.%03u MHz, " | 140 | dev_info(dev, "CPU Frequencies - Minimum %u.%03u MHz, " |