summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/db8500_cpufreq_cooling.c
diff options
context:
space:
mode:
authorEduardo Valentin <edubezval@gmail.com>2014-12-04 05:11:43 +0100
committerEduardo Valentin <edubezval@gmail.com>2014-12-08 17:08:53 +0100
commit0f1be51c358f740fe5183bd0bcd60076fdfb53d0 (patch)
treefcfa99069607e0d7d2562bb7136804b6f94a16db /drivers/thermal/db8500_cpufreq_cooling.c
parentMerge tag 'staging-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
downloadlinux-0f1be51c358f740fe5183bd0bcd60076fdfb53d0.tar.xz
linux-0f1be51c358f740fe5183bd0bcd60076fdfb53d0.zip
thermal: cpu_cooling: check for the readiness of cpufreq layer
In this patch, the cpu_cooling code checks for the usability of cpufreq layer before proceeding with the CPU cooling device registration. The main reason is: CPU cooling device is not usable if cpufreq cannot switch frequencies. Similar checks are spread in thermal drivers. Thus, the advantage now is to have the check in a single place: cpu cooling device registration. For this reason, this patch also updates the existing drivers that depend on CPU cooling to simply propagate the error code of the cpu cooling registration call. Therefore, in case cpufreq is not ready, the thermal drivers will still return -EPROBE_DEFER, in an attempt to try again when cpufreq layer gets ready. Cc: devicetree@vger.kernel.org Cc: Grant Likely <grant.likely@linaro.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Zhang Rui <rui.zhang@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/db8500_cpufreq_cooling.c')
-rw-r--r--drivers/thermal/db8500_cpufreq_cooling.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c
index 786d19263ab0..1ac7ec651c3f 100644
--- a/drivers/thermal/db8500_cpufreq_cooling.c
+++ b/drivers/thermal/db8500_cpufreq_cooling.c
@@ -18,7 +18,6 @@
*/
#include <linux/cpu_cooling.h>
-#include <linux/cpufreq.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/of.h>
@@ -30,10 +29,6 @@ static int db8500_cpufreq_cooling_probe(struct platform_device *pdev)
struct thermal_cooling_device *cdev;
struct cpumask mask_val;
- /* make sure cpufreq driver has been initialized */
- if (!cpufreq_frequency_get_table(0))
- return -EPROBE_DEFER;
-
cpumask_set_cpu(0, &mask_val);
cdev = cpufreq_cooling_register(&mask_val);