diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2017-07-19 15:42:45 +0530 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-26 00:15:44 +0200 |
commit | 768608a578255c0add26bfdcb720d320eca1556b (patch) | |
tree | fcd6176171469c79d5ce5298c65e0cd792b8c520 /drivers/cpufreq | |
parent | b8b78825a2d9b423d5e7cc2943c07c3b8140941e (diff) | |
download | linux-768608a578255c0add26bfdcb720d320eca1556b.tar.gz linux-768608a578255c0add26bfdcb720d320eca1556b.tar.bz2 linux-768608a578255c0add26bfdcb720d320eca1556b.zip |
cpufreq: arm_big_little: Make ->get_transition_latency() mandatory
All users of arm_big_little driver are defining it and there is no need
to keep it optional.
Make it mandatory to remove the always true conditional statement.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/arm_big_little.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index ea6d62547b10..17504129fd77 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -483,11 +483,8 @@ static int bL_cpufreq_init(struct cpufreq_policy *policy) return ret; } - if (arm_bL_ops->get_transition_latency) - policy->cpuinfo.transition_latency = - arm_bL_ops->get_transition_latency(cpu_dev); - else - policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; + policy->cpuinfo.transition_latency = + arm_bL_ops->get_transition_latency(cpu_dev); if (is_bL_switching_enabled()) per_cpu(cpu_last_req_freq, policy->cpu) = clk_get_cpu_rate(policy->cpu); @@ -622,7 +619,8 @@ int bL_cpufreq_register(struct cpufreq_arm_bL_ops *ops) return -EBUSY; } - if (!ops || !strlen(ops->name) || !ops->init_opp_table) { + if (!ops || !strlen(ops->name) || !ops->init_opp_table || + !ops->get_transition_latency) { pr_err("%s: Invalid arm_bL_ops, exiting\n", __func__); return -ENODEV; } |