summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-08-03 08:36:18 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-01 15:50:39 +0200
commit88dc4384958759510db248bf9158434ac783d407 (patch)
treeae11a30ca4c160fe55e37e2ccca7685b3747980e /drivers
parente27f8bd248756310a6df8b67f96d41d5a693642c (diff)
cpufreq: remove redundant 'policy' field from user_policy
Its always same as policy->policy, and there is no need to keep another copy of it. Remove it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/cpufreq.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 3033952391fe..a80bd68bbd74 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -671,11 +671,7 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
return -EINVAL;
ret = cpufreq_set_policy(policy, &new_policy);
- if (ret)
- return ret;
-
- policy->user_policy.policy = policy->policy;
- return count;
+ return ret ? ret : count;
}
/**
@@ -1322,9 +1318,6 @@ static int cpufreq_online(unsigned int cpu)
goto out_exit_policy;
}
- if (new_policy)
- policy->user_policy.policy = policy->policy;
-
up_write(&policy->rwsem);
kobject_uevent(&policy->kobj, KOBJ_ADD);
@@ -2302,7 +2295,6 @@ int cpufreq_update_policy(unsigned int cpu)
memcpy(&new_policy, policy, sizeof(*policy));
new_policy.min = policy->user_policy.min;
new_policy.max = policy->user_policy.max;
- new_policy.policy = policy->user_policy.policy;
/*
* BIOS might change freq behind our back