• Sudeep Holla's avatar
    cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK · f943849f
    Sudeep Holla authored
    Commit 8410e7f3 ("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: 8410e7f3 ("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: default avatarSudeep Holla <sudeep.holla@arm.com>
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    f943849f
scmi-cpufreq.c 6.57 KB