diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-02-07 10:24:26 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-03-09 08:40:56 -0500 |
commit | bc505475b85de9a9903e84ef0b369d4637354201 (patch) | |
tree | 1ef25b149f94fe6579e4ba41a0b6abf52ebd3485 /drivers/cpufreq/cpufreq_conservative.c | |
parent | e9751894000af398d5895b3ee96052f57b80cc44 (diff) |
cpufreq: governor: Rearrange governor data structures
The struct policy_dbs_info objects representing per-policy governor
data are not accessible directly from the corresponding policy
objects. To access them, one has to get a pointer to the
struct cpu_dbs_info of policy->cpu and use the policy_dbs field of
that which isn't really straightforward.
To address that rearrange the governor data structures so the
governor_data pointer in struct cpufreq_policy will point to
struct policy_dbs_info (instead of struct dbs_data) and that will
contain a pointer to struct dbs_data.
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_conservative.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index b8054e53a37e..1a899bb7d1a4 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -48,7 +48,8 @@ static void cs_check_cpu(int cpu, unsigned int load) | |||
48 | { | 48 | { |
49 | struct cs_cpu_dbs_info_s *dbs_info = &per_cpu(cs_cpu_dbs_info, cpu); | 49 | struct cs_cpu_dbs_info_s *dbs_info = &per_cpu(cs_cpu_dbs_info, cpu); |
50 | struct cpufreq_policy *policy = dbs_info->cdbs.policy_dbs->policy; | 50 | struct cpufreq_policy *policy = dbs_info->cdbs.policy_dbs->policy; |
51 | struct dbs_data *dbs_data = policy->governor_data; | 51 | struct policy_dbs_info *policy_dbs = policy->governor_data; |
52 | struct dbs_data *dbs_data = policy_dbs->dbs_data; | ||
52 | struct cs_dbs_tuners *cs_tuners = dbs_data->tuners; | 53 | struct cs_dbs_tuners *cs_tuners = dbs_data->tuners; |
53 | 54 | ||
54 | /* | 55 | /* |
@@ -104,7 +105,8 @@ static void cs_check_cpu(int cpu, unsigned int load) | |||
104 | 105 | ||
105 | static unsigned int cs_dbs_timer(struct cpufreq_policy *policy) | 106 | static unsigned int cs_dbs_timer(struct cpufreq_policy *policy) |
106 | { | 107 | { |
107 | struct dbs_data *dbs_data = policy->governor_data; | 108 | struct policy_dbs_info *policy_dbs = policy->governor_data; |
109 | struct dbs_data *dbs_data = policy_dbs->dbs_data; | ||
108 | struct cs_dbs_tuners *cs_tuners = dbs_data->tuners; | 110 | struct cs_dbs_tuners *cs_tuners = dbs_data->tuners; |
109 | 111 | ||
110 | dbs_check_cpu(policy); | 112 | dbs_check_cpu(policy); |