diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-08-02 23:06:18 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-09-01 09:50:39 -0400 |
commit | 88dc4384958759510db248bf9158434ac783d407 (patch) | |
tree | ae11a30ca4c160fe55e37e2ccca7685b3747980e /drivers/cpufreq | |
parent | e27f8bd248756310a6df8b67f96d41d5a693642c (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/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 10 |
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, | |||
671 | return -EINVAL; | 671 | return -EINVAL; |
672 | 672 | ||
673 | ret = cpufreq_set_policy(policy, &new_policy); | 673 | ret = cpufreq_set_policy(policy, &new_policy); |
674 | if (ret) | 674 | return ret ? ret : count; |
675 | return ret; | ||
676 | |||
677 | policy->user_policy.policy = policy->policy; | ||
678 | return count; | ||
679 | } | 675 | } |
680 | 676 | ||
681 | /** | 677 | /** |
@@ -1322,9 +1318,6 @@ static int cpufreq_online(unsigned int cpu) | |||
1322 | goto out_exit_policy; | 1318 | goto out_exit_policy; |
1323 | } | 1319 | } |
1324 | 1320 | ||
1325 | if (new_policy) | ||
1326 | policy->user_policy.policy = policy->policy; | ||
1327 | |||
1328 | up_write(&policy->rwsem); | 1321 | up_write(&policy->rwsem); |
1329 | 1322 | ||
1330 | kobject_uevent(&policy->kobj, KOBJ_ADD); | 1323 | kobject_uevent(&policy->kobj, KOBJ_ADD); |
@@ -2302,7 +2295,6 @@ int cpufreq_update_policy(unsigned int cpu) | |||
2302 | memcpy(&new_policy, policy, sizeof(*policy)); | 2295 | memcpy(&new_policy, policy, sizeof(*policy)); |
2303 | new_policy.min = policy->user_policy.min; | 2296 | new_policy.min = policy->user_policy.min; |
2304 | new_policy.max = policy->user_policy.max; | 2297 | new_policy.max = policy->user_policy.max; |
2305 | new_policy.policy = policy->user_policy.policy; | ||
2306 | 2298 | ||
2307 | /* | 2299 | /* |
2308 | * BIOS might change freq behind our back | 2300 | * BIOS might change freq behind our back |