From 5d5dcb35a48f9af83cf8f46a78cd8c4cedebaef9 Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Wed, 20 Nov 2019 15:21:49 -0700 Subject: [PATCH] drivers: thermal: cpu_cooling: Use Policy cpu as cdev ID CPU cooling driver uses the IDA index to name the CPU cooling device. This doesn't give the visibility of which cpufreq policy this particular cooling device is managing. Use the Policy CPU as the cooling device ID and this will have a one to one correlation to the cpufreq policy ID. Change-Id: I1ee0ac383328f4eb7e3f83e970d03af97aba9953 Signed-off-by: Ram Chandrasekar --- drivers/thermal/cpu_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 6b9865c786ba..41c05098ed1d 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -586,7 +586,7 @@ __cpufreq_cooling_register(struct device_node *np, cdev = ERR_PTR(ret); goto free_table; } - cpufreq_cdev->id = ret; + cpufreq_cdev->id = policy->cpu; snprintf(dev_name, sizeof(dev_name), "thermal-cpufreq-%d", cpufreq_cdev->id);