Commit 69ecb323 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Sudeep Holla

cpufreq: arm_scmi: Constify scmi_perf_ops pointers

The perf_ops are not modified through this pointer. Make them const to
indicate that. This is in preparation to make the scmi-ops pointers in
scmi_handle const.

Link: https://lore.kernel.org/r/20200906230452.33410-2-rikard.falkeborn@gmail.comAcked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent 9123e3a7
...@@ -29,7 +29,7 @@ static const struct scmi_handle *handle; ...@@ -29,7 +29,7 @@ static const struct scmi_handle *handle;
static unsigned int scmi_cpufreq_get_rate(unsigned int cpu) static unsigned int scmi_cpufreq_get_rate(unsigned int cpu)
{ {
struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu); struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu);
struct scmi_perf_ops *perf_ops = handle->perf_ops; const struct scmi_perf_ops *perf_ops = handle->perf_ops;
struct scmi_data *priv = policy->driver_data; struct scmi_data *priv = policy->driver_data;
unsigned long rate; unsigned long rate;
int ret; int ret;
...@@ -50,7 +50,7 @@ scmi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) ...@@ -50,7 +50,7 @@ scmi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index)
{ {
int ret; int ret;
struct scmi_data *priv = policy->driver_data; struct scmi_data *priv = policy->driver_data;
struct scmi_perf_ops *perf_ops = handle->perf_ops; const struct scmi_perf_ops *perf_ops = handle->perf_ops;
u64 freq = policy->freq_table[index].frequency; u64 freq = policy->freq_table[index].frequency;
ret = perf_ops->freq_set(handle, priv->domain_id, freq * 1000, false); ret = perf_ops->freq_set(handle, priv->domain_id, freq * 1000, false);
...@@ -64,7 +64,7 @@ static unsigned int scmi_cpufreq_fast_switch(struct cpufreq_policy *policy, ...@@ -64,7 +64,7 @@ static unsigned int scmi_cpufreq_fast_switch(struct cpufreq_policy *policy,
unsigned int target_freq) unsigned int target_freq)
{ {
struct scmi_data *priv = policy->driver_data; struct scmi_data *priv = policy->driver_data;
struct scmi_perf_ops *perf_ops = handle->perf_ops; const struct scmi_perf_ops *perf_ops = handle->perf_ops;
if (!perf_ops->freq_set(handle, priv->domain_id, if (!perf_ops->freq_set(handle, priv->domain_id,
target_freq * 1000, true)) { target_freq * 1000, true)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment