]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK
authorSudeep Holla <sudeep.holla@arm.com>
Fri, 20 Nov 2020 10:12:52 +0000 (10:12 +0000)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 23 Nov 2020 04:45:56 +0000 (10:15 +0530)
commitb02483bf60c4843d9af6f824395ba432ccb6c899
tree49e7365b960f622d13f357287722a4c8e2417ebf
parent6053547f17c9992061d88de63cbd9bc314aa2ca1
cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK

Commit 6053547f17c9 ("cpufreq: scmi: Fix OPP addition failure with a
dummy clock provider") registers a dummy clock provider using
devm_of_clk_add_hw_provider. These *_hw_provider functions are defined
only when CONFIG_COMMON_CLK=y. One possible fix is to add the Kconfig
dependency, but since we plan to move away from the clock dependency
for scmi cpufreq, it is preferrable to avoid that.

Let us just conditionally compile out the offending call to
devm_of_clk_add_hw_provider. It also uses the variable 'dev' outside
of the #ifdef block to avoid build warning.

Fixes: 6053547f17c9 ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider")
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/scmi-cpufreq.c