]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: cpufreq-cpu0: fix CPU_THERMAL dependency
authorArnd Bergmann <arnd@arndb.de>
Fri, 13 Jun 2014 08:40:32 +0000 (10:40 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 16 Jun 2014 20:33:38 +0000 (22:33 +0200)
commit5f4e5350388cce3e1b57b3554b28dfbd38f4f2dd
tree8f031184f4a278d9c3fd5030a27527fc1f0b86bb
parent29230ba12c9ebdc4bb6e22babcaec9dfa3d76ff4
cpufreq: cpufreq-cpu0: fix CPU_THERMAL dependency

d60a1f88d5e67 ("cpufreq: cpufreq-cpu0: remove dependency on THERMAL and
REGULATOR") was a little too quick in completely removing the dependency
on the THERMAL driver.

The problem is that while there are inline wrappers to turn the thermal
API calls into empty functions, those do not help if the cpu-thermal
driver is a loadable module and cpufreq-cpu0 is builtin.

Since CONFIG_CPU_THERMAL is a bool option that decides whether the cpu
code is built into the thermal module or not, we have to use a dependency
on the thermal driver itself. However, if CPU_THERMAL is disabled, we
don't need the dependency, hence the strange '!CPU_THERMAL || THERMAL'
construct.

Fixes: d60a1f88d5e67 ("cpufreq: cpufreq-cpu0: remove dependency on THERMAL and REGULATOR")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/Kconfig