summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-01-02 08:04:32 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-01-23 22:49:34 +0100
commit7f0c020ab6ecb513394de9b02df33a5cfc62084f (patch)
tree4f1637267433cf91e219e6a1ab6d62b26aad922d /drivers/cpufreq/cpufreq.c
parentcpufreq: get rid of CONFIG_{HOTPLUG_CPU|SMP} mess (diff)
downloadlinux-7f0c020ab6ecb513394de9b02df33a5cfc62084f.tar.xz
linux-7f0c020ab6ecb513394de9b02df33a5cfc62084f.zip
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>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c8
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)
{
unsigned int j, cpu = dev->id;
int ret = -ENOMEM;
- struct cpufreq_policy *policy, *tpolicy;
+ struct cpufreq_policy *policy;
unsigned long flags;
bool recover_policy = cpufreq_suspended;
@@ -1127,10 +1127,10 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
/* Check if this cpu was hot-unplugged earlier and has siblings */
read_lock_irqsave(&cpufreq_driver_lock, flags);
- list_for_each_entry(tpolicy, &cpufreq_policy_list, policy_list) {
- if (cpumask_test_cpu(cpu, tpolicy->related_cpus)) {
+ list_for_each_entry(policy, &cpufreq_policy_list, policy_list) {
+ if (cpumask_test_cpu(cpu, policy->related_cpus)) {
read_unlock_irqrestore(&cpufreq_driver_lock, flags);
- ret = cpufreq_add_policy_cpu(tpolicy, cpu, dev);
+ ret = cpufreq_add_policy_cpu(policy, cpu, dev);
up_read(&cpufreq_rwsem);
return ret;
}