summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-08-03 06:06:17 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-01 16:50:39 +0300
commite27f8bd248756310a6df8b67f96d41d5a693642c (patch)
tree09c25709f48aaeb92c82742d234c236e6d2c195e
parent14ca0bdfdd6b422027b9b733abb0bf151811eaa7 (diff)
downloadlinux-e27f8bd248756310a6df8b67f96d41d5a693642c.tar.xz
cpufreq: remove redundant 'governor' field from user_policy
Its always same as policy->governor, 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>
-rw-r--r--drivers/cpufreq/cpufreq.c7
-rw-r--r--include/linux/cpufreq.h1
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 8e71d8e08439..3033952391fe 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -675,7 +675,6 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
return ret;
policy->user_policy.policy = policy->policy;
- policy->user_policy.governor = policy->governor;
return count;
}
@@ -1323,10 +1322,9 @@ static int cpufreq_online(unsigned int cpu)
goto out_exit_policy;
}
- if (new_policy) {
+ if (new_policy)
policy->user_policy.policy = policy->policy;
- policy->user_policy.governor = policy->governor;
- }
+
up_write(&policy->rwsem);
kobject_uevent(&policy->kobj, KOBJ_ADD);
@@ -2305,7 +2303,6 @@ int cpufreq_update_policy(unsigned int cpu)
new_policy.min = policy->user_policy.min;
new_policy.max = policy->user_policy.max;
new_policy.policy = policy->user_policy.policy;
- new_policy.governor = policy->user_policy.governor;
/*
* BIOS might change freq behind our back
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index bedcc90c0757..752bf8a5c314 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -55,7 +55,6 @@ struct cpufreq_real_policy {
unsigned int min; /* in kHz */
unsigned int max; /* in kHz */
unsigned int policy; /* see above */
- struct cpufreq_governor *governor; /* see below */
};
struct cpufreq_policy {