cpufreq: remove redundant 'governor' field from user_policy
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 3 Aug 2015 03:06:17 +0000 (08:36 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 1 Sep 2015 13:50:39 +0000 (15:50 +0200)
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>
drivers/cpufreq/cpufreq.c
include/linux/cpufreq.h

index 8e71d8e084397b7792ff3c5f8c7dad071dd055bf..3033952391fe3c07a6e06771eef1fea7f573b506 100644 (file)
@@ -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
index bedcc90c0757f7c425ddba6e96142d980bc0d305..752bf8a5c3146b30bd27a3db31fc6d939b517fd4 100644 (file)
@@ -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 {