Commit 88dc4384 authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e27f8bd2
...@@ -671,11 +671,7 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy, ...@@ -671,11 +671,7 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
return -EINVAL; return -EINVAL;
ret = cpufreq_set_policy(policy, &new_policy); ret = cpufreq_set_policy(policy, &new_policy);
if (ret) return ret ? ret : count;
return ret;
policy->user_policy.policy = policy->policy;
return count;
} }
/** /**
...@@ -1322,9 +1318,6 @@ static int cpufreq_online(unsigned int cpu) ...@@ -1322,9 +1318,6 @@ static int cpufreq_online(unsigned int cpu)
goto out_exit_policy; goto out_exit_policy;
} }
if (new_policy)
policy->user_policy.policy = policy->policy;
up_write(&policy->rwsem); up_write(&policy->rwsem);
kobject_uevent(&policy->kobj, KOBJ_ADD); kobject_uevent(&policy->kobj, KOBJ_ADD);
...@@ -2302,7 +2295,6 @@ int cpufreq_update_policy(unsigned int cpu) ...@@ -2302,7 +2295,6 @@ int cpufreq_update_policy(unsigned int cpu)
memcpy(&new_policy, policy, sizeof(*policy)); memcpy(&new_policy, policy, sizeof(*policy));
new_policy.min = policy->user_policy.min; new_policy.min = policy->user_policy.min;
new_policy.max = policy->user_policy.max; new_policy.max = policy->user_policy.max;
new_policy.policy = policy->user_policy.policy;
/* /*
* BIOS might change freq behind our back * BIOS might change freq behind our back
......
...@@ -54,7 +54,6 @@ struct cpufreq_cpuinfo { ...@@ -54,7 +54,6 @@ struct cpufreq_cpuinfo {
struct cpufreq_real_policy { struct cpufreq_real_policy {
unsigned int min; /* in kHz */ unsigned int min; /* in kHz */
unsigned int max; /* in kHz */ unsigned int max; /* in kHz */
unsigned int policy; /* see above */
}; };
struct cpufreq_policy { struct cpufreq_policy {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment