diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-08-06 13:23:05 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-07 17:34:10 -0400 |
commit | 3a3e9e06d0c11b8efa95933a88c9e67209fa4330 (patch) | |
tree | 29f19cbdaf481676527ca866caa618bcdfbac4ca /drivers/cpufreq/cpufreq_stats.c | |
parent | 74aca95da74836a6807118f6590d8df8232c74a9 (diff) |
cpufreq: Give consistent names to cpufreq_policy objects
They are called policy, cur_policy, new_policy, data, etc. Just call
them policy wherever possible.
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_stats.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_stats.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index a7143b0597af..a17b14ee37d8 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
@@ -193,7 +193,7 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy, | |||
193 | { | 193 | { |
194 | unsigned int i, j, count = 0, ret = 0; | 194 | unsigned int i, j, count = 0, ret = 0; |
195 | struct cpufreq_stats *stat; | 195 | struct cpufreq_stats *stat; |
196 | struct cpufreq_policy *data; | 196 | struct cpufreq_policy *current_policy; |
197 | unsigned int alloc_size; | 197 | unsigned int alloc_size; |
198 | unsigned int cpu = policy->cpu; | 198 | unsigned int cpu = policy->cpu; |
199 | if (per_cpu(cpufreq_stats_table, cpu)) | 199 | if (per_cpu(cpufreq_stats_table, cpu)) |
@@ -202,13 +202,13 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy, | |||
202 | if ((stat) == NULL) | 202 | if ((stat) == NULL) |
203 | return -ENOMEM; | 203 | return -ENOMEM; |
204 | 204 | ||
205 | data = cpufreq_cpu_get(cpu); | 205 | current_policy = cpufreq_cpu_get(cpu); |
206 | if (data == NULL) { | 206 | if (current_policy == NULL) { |
207 | ret = -EINVAL; | 207 | ret = -EINVAL; |
208 | goto error_get_fail; | 208 | goto error_get_fail; |
209 | } | 209 | } |
210 | 210 | ||
211 | ret = sysfs_create_group(&data->kobj, &stats_attr_group); | 211 | ret = sysfs_create_group(¤t_policy->kobj, &stats_attr_group); |
212 | if (ret) | 212 | if (ret) |
213 | goto error_out; | 213 | goto error_out; |
214 | 214 | ||
@@ -251,10 +251,10 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy, | |||
251 | stat->last_time = get_jiffies_64(); | 251 | stat->last_time = get_jiffies_64(); |
252 | stat->last_index = freq_table_get_index(stat, policy->cur); | 252 | stat->last_index = freq_table_get_index(stat, policy->cur); |
253 | spin_unlock(&cpufreq_stats_lock); | 253 | spin_unlock(&cpufreq_stats_lock); |
254 | cpufreq_cpu_put(data); | 254 | cpufreq_cpu_put(current_policy); |
255 | return 0; | 255 | return 0; |
256 | error_out: | 256 | error_out: |
257 | cpufreq_cpu_put(data); | 257 | cpufreq_cpu_put(current_policy); |
258 | error_get_fail: | 258 | error_get_fail: |
259 | kfree(stat); | 259 | kfree(stat); |
260 | per_cpu(cpufreq_stats_table, cpu) = NULL; | 260 | per_cpu(cpufreq_stats_table, cpu) = NULL; |