diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-01-02 02:04:32 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-01-23 16:49:34 -0500 |
commit | 7f0c020ab6ecb513394de9b02df33a5cfc62084f (patch) | |
tree | 4f1637267433cf91e219e6a1ab6d62b26aad922d | |
parent | 22a7cfb01415cfa4284af20555942c427af452e0 (diff) |
cpufreq: get rid of 'tpolicy' from __cpufreq_add_dev()
There is no need of this separate variable, use 'policy' instead.
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 1e72621ca157..127cc6f18ca5 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -1105,7 +1105,7 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) | |||
1105 | { | 1105 | { |
1106 | unsigned int j, cpu = dev->id; | 1106 | unsigned int j, cpu = dev->id; |
1107 | int ret = -ENOMEM; | 1107 | int ret = -ENOMEM; |
1108 | struct cpufreq_policy *policy, *tpolicy; | 1108 | struct cpufreq_policy *policy; |
1109 | unsigned long flags; | 1109 | unsigned long flags; |
1110 | bool recover_policy = cpufreq_suspended; | 1110 | bool recover_policy = cpufreq_suspended; |
1111 | 1111 | ||
@@ -1127,10 +1127,10 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) | |||
1127 | 1127 | ||
1128 | /* Check if this cpu was hot-unplugged earlier and has siblings */ | 1128 | /* Check if this cpu was hot-unplugged earlier and has siblings */ |
1129 | read_lock_irqsave(&cpufreq_driver_lock, flags); | 1129 | read_lock_irqsave(&cpufreq_driver_lock, flags); |
1130 | list_for_each_entry(tpolicy, &cpufreq_policy_list, policy_list) { | 1130 | list_for_each_entry(policy, &cpufreq_policy_list, policy_list) { |
1131 | if (cpumask_test_cpu(cpu, tpolicy->related_cpus)) { | 1131 | if (cpumask_test_cpu(cpu, policy->related_cpus)) { |
1132 | read_unlock_irqrestore(&cpufreq_driver_lock, flags); | 1132 | read_unlock_irqrestore(&cpufreq_driver_lock, flags); |
1133 | ret = cpufreq_add_policy_cpu(tpolicy, cpu, dev); | 1133 | ret = cpufreq_add_policy_cpu(policy, cpu, dev); |
1134 | up_read(&cpufreq_rwsem); | 1134 | up_read(&cpufreq_rwsem); |
1135 | return ret; | 1135 | return ret; |
1136 | } | 1136 | } |