]> git.karo-electronics.de Git - karo-tx-linux.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>
Tue, 9 Feb 2016 20:34:52 +0000 (21:34 +0100)
commit6822f38ee9b33081dabc1b633cc660da785dfc70
tree52bd22566fb7e00e9c534ca5091574c03634f4e4
parent229792bbd99c1647de9bd81afbe8719d4f7afd43
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