diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-02-26 00:08:51 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-03-20 07:07:52 -0400 |
commit | 0d105394450796d61d78fa04cc4445d201a3b976 (patch) | |
tree | ab94eba17b087df23590d1a6acd1566ee99a8793 | |
parent | 29aa18a762b8fcf6cbe3310b1f675849c171036b (diff) |
cpufreq: e_powersaver: Don't validate the frequency table twice
The cpufreq core is already validating the CPU frequency table after
calling the ->init() callback of the cpufreq drivers and the drivers
don't need to do the same anymore. Though they need to set the
policy->freq_table field directly from the ->init() callback now.
Stop validating the frequency table from e_powersaver driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/e_powersaver.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index cdf097b29862..60bea302abbe 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c | |||
@@ -184,7 +184,6 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
184 | struct cpuinfo_x86 *c = &cpu_data(0); | 184 | struct cpuinfo_x86 *c = &cpu_data(0); |
185 | struct cpufreq_frequency_table *f_table; | 185 | struct cpufreq_frequency_table *f_table; |
186 | int k, step, voltage; | 186 | int k, step, voltage; |
187 | int ret; | ||
188 | int states; | 187 | int states; |
189 | #if IS_ENABLED(CONFIG_ACPI_PROCESSOR) | 188 | #if IS_ENABLED(CONFIG_ACPI_PROCESSOR) |
190 | unsigned int limit; | 189 | unsigned int limit; |
@@ -359,12 +358,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
359 | } | 358 | } |
360 | 359 | ||
361 | policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */ | 360 | policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */ |
362 | 361 | policy->freq_table = ¢aur->freq_table[0]; | |
363 | ret = cpufreq_table_validate_and_show(policy, ¢aur->freq_table[0]); | ||
364 | if (ret) { | ||
365 | kfree(centaur); | ||
366 | return ret; | ||
367 | } | ||
368 | 362 | ||
369 | return 0; | 363 | return 0; |
370 | } | 364 | } |