struct dbs_data *dbs_data = policy->governor_data;
struct cs_dbs_tuners *cs_tuners = dbs_data->tuners;
- dbs_check_cpu(policy, policy->cpu);
+ dbs_check_cpu(policy);
return delay_for_sampling_rate(cs_tuners->sampling_rate);
}
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;
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)
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;
extern struct mutex dbs_data_mutex;
extern struct mutex cpufreq_governor_lock;
-void dbs_check_cpu(struct cpufreq_policy *policy, int cpu);
+void dbs_check_cpu(struct cpufreq_policy *policy);
int cpufreq_governor_dbs(struct cpufreq_policy *policy, unsigned int event);
void od_register_powersave_bias_handler(unsigned int (*f)
(struct cpufreq_policy *, unsigned int, unsigned int),
static unsigned int od_dbs_timer(struct cpufreq_policy *policy)
{
struct dbs_data *dbs_data = policy->governor_data;
- unsigned int cpu = policy->cpu;
- struct od_cpu_dbs_info_s *dbs_info = &per_cpu(od_cpu_dbs_info,
- cpu);
+ struct od_cpu_dbs_info_s *dbs_info = &per_cpu(od_cpu_dbs_info, policy->cpu);
struct od_dbs_tuners *od_tuners = dbs_data->tuners;
int delay = 0, sample_type = dbs_info->sample_type;
__cpufreq_driver_target(policy, dbs_info->freq_lo,
CPUFREQ_RELATION_H);
} else {
- dbs_check_cpu(policy, cpu);
+ dbs_check_cpu(policy);
if (dbs_info->freq_lo) {
/* Setup timer for SUB_SAMPLE */
dbs_info->sample_type = OD_SUB_SAMPLE;