diff options
author | Jonghwa Lee <jonghwa3.lee@samsung.com> | 2012-09-25 20:43:31 -0400 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2012-09-27 02:11:22 -0400 |
commit | a4b6fec977020a508ff04b05f0fa01221a4ecf29 (patch) | |
tree | 21bd4a00d5a6b1d15778a9f520b32d7bcf88991f /drivers | |
parent | 79e093c3fe9de9fe0743a53e4809f481d2719060 (diff) |
Thermal: Fix bug on cpu_cooling, cooling device's id conflict problem.
This patch fixes small bug on cpu_cooling. CPU cooling device has own
id generated with idr mathod. However in the previous version, it swapped
to all same id at last stage of probing as 0. This makes id's collision and
also occures error when it releases that id.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/thermal/cpu_cooling.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 99a5d7551b33..9050c1b0573c 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c | |||
@@ -351,7 +351,7 @@ struct thermal_cooling_device *cpufreq_cooling_register( | |||
351 | struct cpufreq_cooling_device *cpufreq_dev = NULL; | 351 | struct cpufreq_cooling_device *cpufreq_dev = NULL; |
352 | unsigned int cpufreq_dev_count = 0, min = 0, max = 0; | 352 | unsigned int cpufreq_dev_count = 0, min = 0, max = 0; |
353 | char dev_name[THERMAL_NAME_LENGTH]; | 353 | char dev_name[THERMAL_NAME_LENGTH]; |
354 | int ret = 0, id = 0, i; | 354 | int ret = 0, i; |
355 | struct cpufreq_policy policy; | 355 | struct cpufreq_policy policy; |
356 | 356 | ||
357 | list_for_each_entry(cpufreq_dev, &cooling_cpufreq_list, node) | 357 | list_for_each_entry(cpufreq_dev, &cooling_cpufreq_list, node) |
@@ -396,7 +396,6 @@ struct thermal_cooling_device *cpufreq_cooling_register( | |||
396 | kfree(cpufreq_dev); | 396 | kfree(cpufreq_dev); |
397 | return ERR_PTR(-EINVAL); | 397 | return ERR_PTR(-EINVAL); |
398 | } | 398 | } |
399 | cpufreq_dev->id = id; | ||
400 | cpufreq_dev->cool_dev = cool_dev; | 399 | cpufreq_dev->cool_dev = cool_dev; |
401 | cpufreq_dev->cpufreq_state = 0; | 400 | cpufreq_dev->cpufreq_state = 0; |
402 | mutex_lock(&cooling_cpufreq_lock); | 401 | mutex_lock(&cooling_cpufreq_lock); |