From: Kevin Hao <kexin....@windriver.com>

These two functions were introduced by SDK commit ea89facb789f
("thermal: Add generic device cooling support") and used by several
imx and qoriq thermal drivers. But its name conflict with the functions
in the devfreq_cooling.c. So rename them to fix the build errors.

Signed-off-by: Kevin Hao <kexin....@windriver.com>
---
 drivers/thermal/device_cooling.c | 8 ++++----
 drivers/thermal/imx8mm_thermal.c | 4 ++--
 drivers/thermal/imx_sc_thermal.c | 4 ++--
 drivers/thermal/imx_thermal.c    | 4 ++--
 drivers/thermal/qoriq_thermal.c  | 4 ++--
 include/linux/device_cooling.h   | 8 ++++----
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/thermal/device_cooling.c b/drivers/thermal/device_cooling.c
index c2f7653cbf0b..21dc3ca8f9fe 100644
--- a/drivers/thermal/device_cooling.c
+++ b/drivers/thermal/device_cooling.c
@@ -106,7 +106,7 @@ static void release_idr(struct idr *idr, int id)
        mutex_unlock(&devfreq_cooling_lock);
 }
 
-struct thermal_cooling_device *devfreq_cooling_register(void)
+struct thermal_cooling_device *device_cooling_register(void)
 {
        struct thermal_cooling_device *cool_dev;
        struct devfreq_cooling_device *devfreq_dev = NULL;
@@ -139,9 +139,9 @@ struct thermal_cooling_device 
*devfreq_cooling_register(void)
 
        return cool_dev;
 }
-EXPORT_SYMBOL_GPL(devfreq_cooling_register);
+EXPORT_SYMBOL_GPL(device_cooling_register);
 
-void devfreq_cooling_unregister(struct thermal_cooling_device *cdev)
+void device_cooling_unregister(struct thermal_cooling_device *cdev)
 {
        struct devfreq_cooling_device *devfreq_dev = cdev->devdata;
 
@@ -149,4 +149,4 @@ void devfreq_cooling_unregister(struct 
thermal_cooling_device *cdev)
        release_idr(&devfreq_idr, devfreq_dev->id);
        kfree(devfreq_dev);
 }
-EXPORT_SYMBOL_GPL(devfreq_cooling_unregister);
+EXPORT_SYMBOL_GPL(device_cooling_unregister);
diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index 13394f4dbc3c..4b79b69c0b86 100644
--- a/drivers/thermal/imx8mm_thermal.c
+++ b/drivers/thermal/imx8mm_thermal.c
@@ -236,7 +236,7 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
                }
                tmu->sensors[i].hw_id = i;
 
-               tmu->sensors[i].cdev = devfreq_cooling_register();
+               tmu->sensors[i].cdev = device_cooling_register();
                if (IS_ERR(tmu->sensors[i].cdev)) {
                        ret = PTR_ERR(tmu->sensors[i].cdev);
                        if (ret != -EPROBE_DEFER)
@@ -255,7 +255,7 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
                        dev_err(&pdev->dev,
                                "binding zone %s with cdev %s failed:%d\n",
                                tmu->sensors[i].tzd->type, 
tmu->sensors[i].cdev->type, ret);
-                       devfreq_cooling_unregister(tmu->sensors[i].cdev);
+                       device_cooling_unregister(tmu->sensors[i].cdev);
                        return ret;
                }
 
diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
index 9a588d29866d..c2637997e689 100644
--- a/drivers/thermal/imx_sc_thermal.c
+++ b/drivers/thermal/imx_sc_thermal.c
@@ -186,7 +186,7 @@ static int imx_sc_thermal_probe(struct platform_device 
*pdev)
                sensor->temp_passive = trip[0].temperature;
                sensor->temp_critical = trip[1].temperature;
 
-               sensor->cdev = devfreq_cooling_register();
+               sensor->cdev = device_cooling_register();
                if (IS_ERR(sensor->cdev)) {
                        dev_err(&pdev->dev,
                                "failed to register devfreq cooling device: 
%d\n",
@@ -204,7 +204,7 @@ static int imx_sc_thermal_probe(struct platform_device 
*pdev)
                        dev_err(&sensor->tzd->device,
                                "binding zone %s with cdev %s failed:%d\n",
                                sensor->tzd->type, sensor->cdev->type, ret);
-                       devfreq_cooling_unregister(sensor->cdev);
+                       device_cooling_unregister(sensor->cdev);
                        return ret;
                }
        }
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index c9326e2a9e5c..4c166be55f55 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -652,7 +652,7 @@ static int imx_thermal_register_legacy_cooling(struct 
imx_thermal_data *data)
        if (ret)
                return ret;
 
-       data->cdev[1] = devfreq_cooling_register();
+       data->cdev[1] = device_cooling_register();
        if (IS_ERR(data->cdev[1])) {
                ret = PTR_ERR(data->cdev[1]);
                if (ret != -EPROBE_DEFER) {
@@ -670,7 +670,7 @@ static void imx_thermal_unregister_legacy_cooling(struct 
imx_thermal_data *data)
 {
        cpufreq_cooling_unregister(data->cdev[0]);
        cpufreq_cpu_put(data->policy);
-       devfreq_cooling_unregister(data->cdev[1]);
+       device_cooling_unregister(data->cdev[1]);
 }
 
 #else
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index 6c06fdcd7a56..ad978a8a3687 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -228,7 +228,7 @@ static int qoriq_tmu_register_tmu_zone(struct device *dev,
                                 "Failed to add hwmon sysfs attributes\n");
                /* first thermal zone takes care of system-wide device cooling 
*/
                if (id == 0) {
-                       sensor->cdev = devfreq_cooling_register();
+                       sensor->cdev = device_cooling_register();
                        if (IS_ERR(sensor->cdev)) {
                                ret = PTR_ERR(sensor->cdev);
                                pr_err("failed to register devfreq cooling 
device: %d\n",
@@ -247,7 +247,7 @@ static int qoriq_tmu_register_tmu_zone(struct device *dev,
                                        sensor->tzd->type,
                                        sensor->cdev->type,
                                        ret);
-                               devfreq_cooling_unregister(sensor->cdev);
+                               device_cooling_unregister(sensor->cdev);
                                return ret;
                        }
 
diff --git a/include/linux/device_cooling.h b/include/linux/device_cooling.h
index f318e22c1472..bd57d07b8491 100644
--- a/include/linux/device_cooling.h
+++ b/include/linux/device_cooling.h
@@ -15,8 +15,8 @@
 #ifdef CONFIG_DEVICE_THERMAL
 int register_devfreq_cooling_notifier(struct notifier_block *nb);
 int unregister_devfreq_cooling_notifier(struct notifier_block *nb);
-struct thermal_cooling_device *devfreq_cooling_register(void);
-void devfreq_cooling_unregister(struct thermal_cooling_device *cdev);
+struct thermal_cooling_device *device_cooling_register(void);
+void device_cooling_unregister(struct thermal_cooling_device *cdev);
 #else
 static inline
 int register_devfreq_cooling_notifier(struct notifier_block *nb)
@@ -31,13 +31,13 @@ int unregister_devfreq_cooling_notifier(struct 
notifier_block *nb)
 }
 
 static inline
-struct thermal_cooling_device *devfreq_cooling_register(void)
+struct thermal_cooling_device *device_cooling_register(void)
 {
        return ERR_PTR(-EINVAL);
 }
 
 static inline
-void devfreq_cooling_unregister(struct thermal_cooling_device *cdev)
+void device_cooling_unregister(struct thermal_cooling_device *cdev)
 {
        return;
 }

-- 
2.45.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13919): 
https://lists.yoctoproject.org/g/linux-yocto/message/13919
Mute This Topic: https://lists.yoctoproject.org/mt/105978744/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to