cpufreq: governor: Move rate_mult to struct policy_dbs
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Feb 2016 01:20:51 +0000 (02:20 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Mar 2016 13:41:04 +0000 (14:41 +0100)
commit57dc3bcd454eb420ddf25d89852993b61b351327
treec3ecd7d56d9537f55a294b30672a9e55f8df74d0
parent78347cdb89065f9d40ea28596ef2bd8058eb6d12
cpufreq: governor: Move rate_mult to struct policy_dbs

The rate_mult field in struct od_cpu_dbs_info_s is used by the code
shared with the conservative governor and to access it that code
has to do an ugly governor type check.  However, first of all it
is ever only used for policy->cpu, so it is per-policy rather than
per-CPU and second, it is initialized to 1 by cpufreq_governor_start(),
so if the conservative governor never modifies it, it will have no
effect on the results of any computations.

For these reasons, move rate_mult to struct policy_dbs_info (as a
common field).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cpufreq_governor.c
drivers/cpufreq/cpufreq_governor.h
drivers/cpufreq/cpufreq_ondemand.c