cpufreq: Move the IS_ENABLED(CPU_THERMAL) macro into a stub
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 25 Jun 2019 11:32:41 +0000 (13:32 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 26 Jun 2019 08:59:57 +0000 (10:59 +0200)
commitbcc61569997b2188ba89db43b5b991da01ea2d18
tree8534cfc8864efe3f43247b2234c87e5a26677381
parentfba7402017f95c75281991c58d25f1836c04d9bd
cpufreq: Move the IS_ENABLED(CPU_THERMAL) macro into a stub

cpufreq_online() and cpufreq_offline() [un]register the driver as
a cooling device. This is done if the driver is flagged as a cooling
device in addition with an IS_ENABLED() check to compile out the branching
code.

Group this test in a stub function added in the cpufreq header instead
of having the IS_ENABLED() in the code.

Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c
include/linux/cpufreq.h