summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_ondemand.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-02-07 16:07:51 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-03-09 14:40:54 +0100
commit906a6e5aaef24d3c80bf6a06c794c7541aca64be (patch)
tree2219b7f190959fe04ce8c59a5fca35313ef9f67e /drivers/cpufreq/cpufreq_ondemand.c
parent7bdad34d0890b69c30e8c6a50c9c2311a839fd68 (diff)
downloadlinux-906a6e5aaef24d3c80bf6a06c794c7541aca64be.tar.gz
linux-906a6e5aaef24d3c80bf6a06c794c7541aca64be.tar.bz2
linux-906a6e5aaef24d3c80bf6a06c794c7541aca64be.zip
cpufreq: governor: Rework cpufreq_governor_dbs()
Since it is possible to obtain a pointer to struct dbs_governor from a pointer to the struct governor embedded in it via container_of(), the second argument of cpufreq_governor_init() is not necessary. Accordingly, cpufreq_governor_dbs() doesn't need its second argument either and the ->governor callbacks for both the ondemand and conservative governors may be set to cpufreq_governor_dbs() directly. Make that happen. 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>
Diffstat (limited to 'drivers/cpufreq/cpufreq_ondemand.c')
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index c38a4a1111d4..dcbcbf441ac1 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -539,13 +539,10 @@ static struct od_ops od_ops = {
.freq_increase = dbs_freq_increase,
};
-static int od_cpufreq_governor_dbs(struct cpufreq_policy *policy,
- unsigned int event);
-
static struct dbs_governor od_dbs_gov = {
.gov = {
.name = "ondemand",
- .governor = od_cpufreq_governor_dbs,
+ .governor = cpufreq_governor_dbs,
.max_transition_latency = TRANSITION_LATENCY_LIMIT,
.owner = THIS_MODULE,
},
@@ -563,12 +560,6 @@ static struct dbs_governor od_dbs_gov = {
#define CPU_FREQ_GOV_ONDEMAND (&od_dbs_gov.gov)
-static int od_cpufreq_governor_dbs(struct cpufreq_policy *policy,
- unsigned int event)
-{
- return cpufreq_governor_dbs(policy, &od_dbs_gov, event);
-}
-
static void od_set_powersave_bias(unsigned int powersave_bias)
{
struct cpufreq_policy *policy;