summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/amd_freq_sensitivity.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-06-03 10:58:48 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-06-09 00:58:06 +0200
commit34ac5d7a1d1da203008697e1a69cb4bdbff8684c (patch)
tree1ff8254c6904d54d245a953a16a1c94a5604975f /drivers/cpufreq/amd_freq_sensitivity.c
parentf8bfc116cacbdf7e0e655d8a798a242087ed70a5 (diff)
downloadblackbird-obmc-linux-34ac5d7a1d1da203008697e1a69cb4bdbff8684c.tar.gz
blackbird-obmc-linux-34ac5d7a1d1da203008697e1a69cb4bdbff8684c.zip
cpufreq: ondemand: Don't keep a copy of freq_table pointer
There is absolutely no need to keep a copy to the freq-table in 'struct od_policy_dbs_info'. Use policy->freq_table instead. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/amd_freq_sensitivity.c')
-rw-r--r--drivers/cpufreq/amd_freq_sensitivity.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/cpufreq/amd_freq_sensitivity.c b/drivers/cpufreq/amd_freq_sensitivity.c
index 404360cad25c..bc86816693a8 100644
--- a/drivers/cpufreq/amd_freq_sensitivity.c
+++ b/drivers/cpufreq/amd_freq_sensitivity.c
@@ -48,9 +48,8 @@ static unsigned int amd_powersave_bias_target(struct cpufreq_policy *policy,
struct policy_dbs_info *policy_dbs = policy->governor_data;
struct dbs_data *od_data = policy_dbs->dbs_data;
struct od_dbs_tuners *od_tuners = od_data->tuners;
- struct od_policy_dbs_info *od_info = to_dbs_info(policy_dbs);
- if (!od_info->freq_table)
+ if (!policy->freq_table)
return freq_next;
rdmsr_on_cpu(policy->cpu, MSR_AMD64_FREQ_SENSITIVITY_ACTUAL,
@@ -93,9 +92,9 @@ static unsigned int amd_powersave_bias_target(struct cpufreq_policy *policy,
unsigned int index;
cpufreq_frequency_table_target(policy,
- od_info->freq_table, policy->cur - 1,
+ policy->freq_table, policy->cur - 1,
CPUFREQ_RELATION_H, &index);
- freq_next = od_info->freq_table[index].frequency;
+ freq_next = policy->freq_table[index].frequency;
}
data->freq_prev = freq_next;
OpenPOWER on IntegriCloud