diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-02-06 13:50:24 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-03-09 14:40:55 +0100 |
commit | d10b5eb5fce436ba22443ab83eeb36e195dbf772 (patch) | |
tree | 69d4b67ea294fa056c5e583b82bedae1c42edb24 /drivers/cpufreq/cpufreq_governor.c | |
parent | cpufreq: governor: Rename cpu_common_dbs_info to policy_dbs_info (diff) | |
download | linux-d10b5eb5fce436ba22443ab83eeb36e195dbf772.tar.xz linux-d10b5eb5fce436ba22443ab83eeb36e195dbf772.zip |
cpufreq: governor: Drop cpu argument from dbs_check_cpu()
Since policy->cpu is always passed as the second argument to
dbs_check_cpu(), it is not really necessary to pass it, because
the function can obtain that value via its first argument just fine.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/cpufreq_governor.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index b425cd3da682..431d81f7963c 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -31,8 +31,9 @@ static struct attribute_group *get_sysfs_attr(struct dbs_governor *gov) gov->attr_group_gov_pol : gov->attr_group_gov_sys; } -void dbs_check_cpu(struct cpufreq_policy *policy, int cpu) +void dbs_check_cpu(struct cpufreq_policy *policy) { + int cpu = policy->cpu; struct dbs_governor *gov = dbs_governor_of(policy); struct cpu_dbs_info *cdbs = gov->get_cpu_cdbs(cpu); struct dbs_data *dbs_data = policy->governor_data; @@ -517,8 +518,7 @@ static int cpufreq_governor_stop(struct cpufreq_policy *policy) static int cpufreq_governor_limits(struct cpufreq_policy *policy) { struct dbs_governor *gov = dbs_governor_of(policy); - unsigned int cpu = policy->cpu; - struct cpu_dbs_info *cdbs = gov->get_cpu_cdbs(cpu); + struct cpu_dbs_info *cdbs = gov->get_cpu_cdbs(policy->cpu); /* State should be equivalent to START */ if (!cdbs->policy_dbs || !cdbs->policy_dbs->policy) @@ -531,7 +531,7 @@ static int cpufreq_governor_limits(struct cpufreq_policy *policy) else if (policy->min > cdbs->policy_dbs->policy->cur) __cpufreq_driver_target(cdbs->policy_dbs->policy, policy->min, CPUFREQ_RELATION_L); - dbs_check_cpu(policy, cpu); + dbs_check_cpu(policy); mutex_unlock(&cdbs->policy_dbs->timer_mutex); return 0; |