]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
thermal: cpu_cooling: fix improper order during initialization
authorLukasz Luba <lukasz.luba@arm.com>
Tue, 31 May 2016 10:32:02 +0000 (11:32 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 9 Aug 2016 13:08:02 +0000 (15:08 +0200)
commitbb1c8ce81918ef53b6b909c1baf77d66248ed9a5
treeb37b2c276cd69d605a4956b8619e05bcabe47b0e
parentbcd6a9d00684c4a7d597dc2873a59267e3187d17
thermal: cpu_cooling: fix improper order during initialization

BugLink: http://bugs.launchpad.net/bugs/1607404
commit f840ab18bdf2e415dac21d09fbbbd2873111bd48 upstream.

The freq_table array is not populated before calling
thermal_of_cooling_register. The code which populates the freq table was
introduced in commit f6859014.
This should be done before registering new thermal cooling device.
The log shows effects of this wrong decision.
[    2.172614] cpu cpu1: Failed to get voltage for frequency 1984518656000: -34
[    2.220863] cpu cpu0: Failed to get voltage for frequency 1984524416000: -34

Fixes: f6859014c7e7 ("thermal: cpu_cooling: Store frequencies in descending order")
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Acked-by: Javi Merino <javi.merino@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/thermal/cpu_cooling.c