From 83d14255e34dc4684b007060944b5da68304e95b Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Thu, 20 Aug 2020 16:01:43 -0700 Subject: [PATCH] drivers: thermal: cpu_voltage: Use the child device node The cooling device registration is using the parent node of the cpu voltage cooling device. The devicetree configs are using the child node to identify the cooling device. Switch to use the child device node, so that the cooling device is bound with the thermal zone. Change-Id: Id501421002c5dac7cb924455e09538a384ec9f85 Signed-off-by: Ram Chandrasekar --- drivers/thermal/qcom/cpu_voltage_cooling.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/qcom/cpu_voltage_cooling.c b/drivers/thermal/qcom/cpu_voltage_cooling.c index 21048aa544d4..44f3da1d987d 100644 --- a/drivers/thermal/qcom/cpu_voltage_cooling.c +++ b/drivers/thermal/qcom/cpu_voltage_cooling.c @@ -227,12 +227,11 @@ opp_err_exit: return ERR_PTR(-ENODEV); } -static int cc_init(struct device *dev, int *cpus) +static int cc_init(struct device_node *np, int *cpus) { struct cc_limits_data *cc_cdev; int idx = 0, ret = 0; struct cpufreq_policy *policy; - struct device_node *np = dev->of_node; mutex_lock(&cc_list_lock); list_for_each_entry(cc_cdev, &cc_cdev_list, node) { @@ -323,7 +322,7 @@ static int cc_cooling_probe(struct platform_device *pdev) } } } - ret = cc_init(dev, cpu_map); + ret = cc_init(subsys_np, cpu_map); } return ret;