[PATCH v1 05/14] thermal/core: Remove node pointer parameter parameter when registering a tz

Daniel Lezcano
2026-04-19T18:22:42Z

Now we have a OF version for all functions registering a thermal zone
or a cooling device. Let's remove the device_node pointer parameter in
the core function which is inconsistent with non-OF code.

Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
---
drivers/thermal/thermal_core.c | 6 ++----
drivers/thermal/thermal_core.h | 3 +--
drivers/thermal/thermal_of.c | 2 +-
3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 26231acea382..2f5d214d51a1 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1042,7 +1042,6 @@ void thermal_cooling_device_init_complete(struct thermal_cooling_device *cdev)

/**
* __thermal_cooling_device_register() - register a new thermal cooling device
- * @np: a pointer to a device tree node.
* @type: the thermal cooling device type.
* @devdata: device private data.
* @ops: standard thermal cooling devices callbacks.
@@ -1057,8 +1056,7 @@ void thermal_cooling_device_init_complete(struct thermal_cooling_device *cdev)
* ERR_PTR. Caller must check return value with IS_ERR*() helpers.
*/
struct thermal_cooling_device *
-__thermal_cooling_device_register(struct device_node *np,
- const char *type, void *devdata,
+__thermal_cooling_device_register(const char *type, void *devdata,
const struct thermal_cooling_device_ops *ops)
{
struct thermal_cooling_device *cdev;
@@ -1158,7 +1156,7 @@ thermal_cooling_device_register(const char *type, void *devdata,
{
struct thermal_cooling_device *cdev;

- cdev = __thermal_cooling_device_register(NULL, type, devdata, ops);
+ cdev = __thermal_cooling_device_register(type, devdata, ops);
if (!IS_ERR(cdev))
thermal_cooling_device_init_complete(cdev);

diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index 6e44bcf37b00..d45455bb9e9e 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -272,8 +272,7 @@ void thermal_governor_update_tz(struct thermal_zone_device *tz,
void thermal_cooling_device_init_complete(struct thermal_cooling_device *cdev);

struct thermal_cooling_device *
-__thermal_cooling_device_register(struct device_node *np,
- const char *type, void *devdata,
+__thermal_cooling_device_register(const char *type, void *devdata,
const struct thermal_cooling_device_ops *ops);

/* Helpers */
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index 85fc78bc9e73..3d2fb8f37b9c 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -533,7 +533,7 @@ thermal_of_cooling_device_register(struct device_node *np,
{
struct thermal_cooling_device *cdev;

- cdev = __thermal_cooling_device_register(np, type, devdata, ops);
+ cdev = __thermal_cooling_device_register(type, devdata, ops);
if (IS_ERR(cdev))
return cdev;

--
2.43.0