diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-01-06 10:39:09 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-01-23 17:06:44 -0500 |
commit | c92f2125ac5338151bb5c45e371c701e107e3197 (patch) | |
tree | ef7f6dd3f0bf914e404b54cfdd1e054173a24399 | |
parent | 7c418ff099110d987846c8c670479a3b90ed1dcb (diff) |
cpufreq: stats: drop 'cpu' field of struct cpufreq_stats
'cpu' field of struct cpufreq_stats isn't used anymore and so can be dropped.
This change makes cpufreq_stats_update_policy_cpu() empty and so that is removed
as well.
Reviewed-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/cpufreq_stats.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index cdc5233cf0c4..e1fe0a945639 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
@@ -18,7 +18,6 @@ | |||
18 | static spinlock_t cpufreq_stats_lock; | 18 | static spinlock_t cpufreq_stats_lock; |
19 | 19 | ||
20 | struct cpufreq_stats { | 20 | struct cpufreq_stats { |
21 | unsigned int cpu; | ||
22 | unsigned int total_trans; | 21 | unsigned int total_trans; |
23 | unsigned long long last_time; | 22 | unsigned long long last_time; |
24 | unsigned int max_state; | 23 | unsigned int max_state; |
@@ -187,7 +186,6 @@ static int __cpufreq_stats_create_table(struct cpufreq_policy *policy) | |||
187 | if (ret) | 186 | if (ret) |
188 | goto error_out; | 187 | goto error_out; |
189 | 188 | ||
190 | stats->cpu = cpu; | ||
191 | policy->stats = stats; | 189 | policy->stats = stats; |
192 | 190 | ||
193 | cpufreq_for_each_valid_entry(pos, table) | 191 | cpufreq_for_each_valid_entry(pos, table) |
@@ -244,22 +242,12 @@ static void cpufreq_stats_create_table(unsigned int cpu) | |||
244 | cpufreq_cpu_put(policy); | 242 | cpufreq_cpu_put(policy); |
245 | } | 243 | } |
246 | 244 | ||
247 | static void cpufreq_stats_update_policy_cpu(struct cpufreq_policy *policy) | ||
248 | { | ||
249 | policy->stats->cpu = policy->cpu; | ||
250 | } | ||
251 | |||
252 | static int cpufreq_stat_notifier_policy(struct notifier_block *nb, | 245 | static int cpufreq_stat_notifier_policy(struct notifier_block *nb, |
253 | unsigned long val, void *data) | 246 | unsigned long val, void *data) |
254 | { | 247 | { |
255 | int ret = 0; | 248 | int ret = 0; |
256 | struct cpufreq_policy *policy = data; | 249 | struct cpufreq_policy *policy = data; |
257 | 250 | ||
258 | if (val == CPUFREQ_UPDATE_POLICY_CPU) { | ||
259 | cpufreq_stats_update_policy_cpu(policy); | ||
260 | return 0; | ||
261 | } | ||
262 | |||
263 | if (val == CPUFREQ_CREATE_POLICY) | 251 | if (val == CPUFREQ_CREATE_POLICY) |
264 | ret = __cpufreq_stats_create_table(policy); | 252 | ret = __cpufreq_stats_create_table(policy); |
265 | else if (val == CPUFREQ_REMOVE_POLICY) | 253 | else if (val == CPUFREQ_REMOVE_POLICY) |