summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/armada-37xx-cpufreq.c
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-04-08 14:42:22 +0300
committerViresh Kumar <viresh.kumar@linaro.org>2021-04-09 12:47:33 +0300
commit5f23eb9dc0cd2a58bbfe887f335ad632368e530a (patch)
tree749d76c0fee3cb9c455ccb73b14d116ab1fd1e43 /drivers/cpufreq/armada-37xx-cpufreq.c
parent8bad3bf23cbc40abe1d24cec08a114df6facf858 (diff)
downloadlinux-5f23eb9dc0cd2a58bbfe887f335ad632368e530a.tar.xz
cpufreq: armada-37xx: Remove cur_frequency variable
Variable cur_frequency in armada37xx_cpufreq_driver_init() is unused. Signed-off-by: Pali Rohár <pali@kernel.org> Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com> Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com> Tested-by: Anders Trier Olesen <anders.trier.olesen@gmail.com> Tested-by: Philip Soares <philips@netisense.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/armada-37xx-cpufreq.c')
-rw-r--r--drivers/cpufreq/armada-37xx-cpufreq.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c
index e4782f562e7a..050abff18308 100644
--- a/drivers/cpufreq/armada-37xx-cpufreq.c
+++ b/drivers/cpufreq/armada-37xx-cpufreq.c
@@ -400,7 +400,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
struct armada_37xx_dvfs *dvfs;
struct platform_device *pdev;
unsigned long freq;
- unsigned int cur_frequency, base_frequency;
+ unsigned int base_frequency;
struct regmap *nb_clk_base, *nb_pm_base, *avs_base;
struct device *cpu_dev;
int load_lvl, ret;
@@ -461,14 +461,6 @@ static int __init armada37xx_cpufreq_driver_init(void)
return -EINVAL;
}
- /* Get nominal (current) CPU frequency */
- cur_frequency = clk_get_rate(clk);
- if (!cur_frequency) {
- dev_err(cpu_dev, "Failed to get clock rate for CPU\n");
- clk_put(clk);
- return -EINVAL;
- }
-
dvfs = armada_37xx_cpu_freq_info_get(base_frequency);
if (!dvfs) {
clk_put(clk);