diff options
author | Zhang Rui <rui.zhang@intel.com> | 2014-12-21 22:49:12 +0800 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2014-12-21 22:49:12 +0800 |
commit | 32c9edc4e356063e0218362d452a269cfa6798ee (patch) | |
tree | 43982a1f642c7fedef1cc5f8c247b646582cbe03 /drivers/thermal/db8500_cpufreq_cooling.c | |
parent | 59c56eb6db0c14fe569b1c9625cb850e52d29d88 (diff) | |
parent | 503ccc3fec4a56cdcfedc507cd1ea0d85e1fbfa2 (diff) | |
download | op-kernel-dev-32c9edc4e356063e0218362d452a269cfa6798ee.zip op-kernel-dev-32c9edc4e356063e0218362d452a269cfa6798ee.tar.gz |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc
Diffstat (limited to 'drivers/thermal/db8500_cpufreq_cooling.c')
-rw-r--r-- | drivers/thermal/db8500_cpufreq_cooling.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c index 000d53e..607b62c 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> @@ -28,18 +27,17 @@ 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); + cdev = cpufreq_cooling_register(cpu_present_mask); if (IS_ERR(cdev)) { - dev_err(&pdev->dev, "Failed to register cooling device\n"); - return PTR_ERR(cdev); + int ret = PTR_ERR(cdev); + + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, + "Failed to register cooling device %d\n", + ret); + + return ret; } platform_set_drvdata(pdev, cdev); |