]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: governor: Put governor structure into common_dbs_data
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 5 Feb 2016 02:16:08 +0000 (03:16 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Mar 2016 13:40:54 +0000 (14:40 +0100)
commit7ac5d6306693c8c5f3303366452113e7cc76fcc7
tree665addfcea5d3377b255f0fe9c14534a50a430b6
parentab99337f7c5e7166020e20df3703474723125049
cpufreq: governor: Put governor structure into common_dbs_data

For the ondemand and conservative governors (generally, governors
that use the common code in cpufreq_governor.c), there are two static
data structures representing the governor, the struct governor
structure (the interface to the cpufreq core) and the struct
common_dbs_data one (the interface to the cpufreq_governor.c code).

There's no fundamental reason why those two structures have to be
separate.  Moreover, if the struct governor one is included into
struct common_dbs_data, it will be possible to reach the latter from
the policy via its policy->governor pointer, so it won't be necessary
to pass a separate pointer to it around.  For this reason, embed
struct governor in struct common_dbs_data.

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