summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-03-06 13:43:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-03-06 13:43:33 -0800
commit5b3b5921bad8617ff0b3fbfc2a2c6617f2525fd9 (patch)
tree88a2818e91847f3db9d4acbeed94eef0fa409f74 /drivers/cpufreq
parent5f237425f352487a2e3fdef2f0557eedcd97d898 (diff)
parent2dc10f8963e6a03a1a75deafe1d1984bafab08dd (diff)
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal
Pull thermal management fixes from Eduardo Valentin: "Specifics: - adding Lukasz as maintainer of samsung thermal driver. - driver fixes: exynos and int430x. - one fix in the exynos cpufreq driver related to cpu cooling (acked by cpufreq maintainer). - fix default sysfs attributes of cooling devices Note: I am sending this pull on Rui's behalf while he fixes issues in his Linux box" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: thermal: Make sysfs attributes of cooling devices default attributes Thermal/int340x: Fix memleak for aux trip MAINTAINERS: Add entry for SAMSUNG THERMAL DRIVER cpufreq: exynos: Use simple approach to asses if cpu cooling can be used thermal: exynos: Fix wrong control of power down detection mode for Exynos7
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/exynos-cpufreq.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index 5e98c6b1f284..82d2fbb20f7e 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -159,7 +159,7 @@ static struct cpufreq_driver exynos_driver = {
static int exynos_cpufreq_probe(struct platform_device *pdev)
{
- struct device_node *cpus, *np;
+ struct device_node *cpu0;
int ret = -EINVAL;
exynos_info = kzalloc(sizeof(*exynos_info), GFP_KERNEL);
@@ -206,28 +206,19 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
if (ret)
goto err_cpufreq_reg;
- cpus = of_find_node_by_path("/cpus");
- if (!cpus) {
- pr_err("failed to find cpus node\n");
+ cpu0 = of_get_cpu_node(0, NULL);
+ if (!cpu0) {
+ pr_err("failed to find cpu0 node\n");
return 0;
}
- np = of_get_next_child(cpus, NULL);
- if (!np) {
- pr_err("failed to find cpus child node\n");
- of_node_put(cpus);
- return 0;
- }
-
- if (of_find_property(np, "#cooling-cells", NULL)) {
- cdev = of_cpufreq_cooling_register(np,
+ if (of_find_property(cpu0, "#cooling-cells", NULL)) {
+ cdev = of_cpufreq_cooling_register(cpu0,
cpu_present_mask);
if (IS_ERR(cdev))
pr_err("running cpufreq without cooling device: %ld\n",
PTR_ERR(cdev));
}
- of_node_put(np);
- of_node_put(cpus);
return 0;