Skip to content

Commit d983af9

Browse files
vireshkrafaeljw
authored andcommitted
cpufreq: SCMI: 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 SCMI driver. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 8913315 commit d983af9

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

‎drivers/cpufreq/scmi-cpufreq.c‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
159159
priv->domain_id = handle->perf_ops->device_domain_id(cpu_dev);
160160

161161
policy->driver_data = priv;
162-
163-
ret = cpufreq_table_validate_and_show(policy, freq_table);
164-
if (ret) {
165-
dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__,
166-
ret);
167-
goto out_free_cpufreq_table;
168-
}
162+
policy->freq_table = freq_table;
169163

170164
/* SCMI allows DVFS request for any domain from any CPU */
171165
policy->dvfs_possible_from_any_cpu = true;
@@ -179,8 +173,6 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
179173
policy->fast_switch_possible = true;
180174
return 0;
181175

182-
out_free_cpufreq_table:
183-
dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
184176
out_free_priv:
185177
kfree(priv);
186178
out_free_opp:

0 commit comments

Comments
 (0)