cpufreq: cppc: Reorder code and remove apply_hisi_workaround variable
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 23 Jun 2020 05:08:47 +0000 (10:38 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 30 Jul 2020 05:27:46 +0000 (10:57 +0530)
commitd88b0f0edb9041be6feff98e83cd6002e4ab534e
tree99a5c6e5170d166c0fbf089d2298fb904e1bc62e
parent10470dec3decaf5ed3c596f85debd7c42777ae12
cpufreq: cppc: Reorder code and remove apply_hisi_workaround variable

With the current approach we have an extra check in the
cppc_cpufreq_get_rate() callback, which checks if hisilicon's get rate
implementation should be used instead. While it works fine, the approach
isn't very straight forward, over that we have an extra check in the
routine.

Rearrange code and update the cpufreq driver's get() callback pointer
directly for the hisilicon case. This gets the extra variable is removed
and the extra check isn't required anymore as well.

Tested-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cppc_cpufreq.c