diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-06-03 07:28:48 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-06-09 00:58:06 +0200 |
commit | 34ac5d7a1d1da203008697e1a69cb4bdbff8684c (patch) | |
tree | 1ff8254c6904d54d245a953a16a1c94a5604975f /drivers/cpufreq/cpufreq_ondemand.c | |
parent | cpufreq: Remove cpufreq_frequency_get_table() (diff) | |
download | linux-34ac5d7a1d1da203008697e1a69cb4bdbff8684c.tar.xz 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/cpufreq_ondemand.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 4d2fe2710c5d..528353f204fd 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -71,28 +71,29 @@ static unsigned int generic_powersave_bias_target(struct cpufreq_policy *policy, struct od_policy_dbs_info *dbs_info = to_dbs_info(policy_dbs); struct dbs_data *dbs_data = policy_dbs->dbs_data; struct od_dbs_tuners *od_tuners = dbs_data->tuners; + struct cpufreq_frequency_table *freq_table = policy->freq_table; - if (!dbs_info->freq_table) { + if (!freq_table) { dbs_info->freq_lo = 0; dbs_info->freq_lo_delay_us = 0; return freq_next; } - cpufreq_frequency_table_target(policy, dbs_info->freq_table, freq_next, - relation, &index); - freq_req = dbs_info->freq_table[index].frequency; + cpufreq_frequency_table_target(policy, freq_table, freq_next, relation, + &index); + freq_req = freq_table[index].frequency; freq_reduc = freq_req * od_tuners->powersave_bias / 1000; freq_avg = freq_req - freq_reduc; /* Find freq bounds for freq_avg in freq_table */ index = 0; - cpufreq_frequency_table_target(policy, dbs_info->freq_table, freq_avg, - CPUFREQ_RELATION_H, &index); - freq_lo = dbs_info->freq_table[index].frequency; + cpufreq_frequency_table_target(policy, freq_table, freq_avg, + CPUFREQ_RELATION_H, &index); + freq_lo = freq_table[index].frequency; index = 0; - cpufreq_frequency_table_target(policy, dbs_info->freq_table, freq_avg, - CPUFREQ_RELATION_L, &index); - freq_hi = dbs_info->freq_table[index].frequency; + cpufreq_frequency_table_target(policy, freq_table, freq_avg, + CPUFREQ_RELATION_L, &index); + freq_hi = freq_table[index].frequency; /* Find out how long we have to be in hi and lo freqs */ if (freq_hi == freq_lo) { @@ -113,7 +114,6 @@ static void ondemand_powersave_bias_init(struct cpufreq_policy *policy) { struct od_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data); - dbs_info->freq_table = policy->freq_table; dbs_info->freq_lo = 0; } |