[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220507125443.2766939-6-daniel.lezcano@linexp.org>
Date: Sat, 7 May 2022 14:54:33 +0200
From: Daniel Lezcano <daniel.lezcano@...exp.org>
To: daniel.lezcano@...aro.org, rafael@...nel.org
Cc: khilman@...libre.com, abailon@...libre.com,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Amit Kucheria <amitk@...nel.org>,
Zhang Rui <rui.zhang@...el.com>
Subject: [PATCH v2 05/14] thermal/of: Remove the device node pointer for thermal_trip
The device node pointer is no longer needed in the thermal trip
structure, remove it.
Cc: Alexandre Bailon <abailon@...libre.com>
Cc: Kevin Hilman <khilman@...libre.com>
Cc; Eduardo Valentin <eduval@...zon.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@...exp.org>
---
drivers/thermal/thermal_core.h | 2 --
drivers/thermal/thermal_of.c | 8 --------
2 files changed, 10 deletions(-)
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index 726e327b4205..ff10cdda056c 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -70,13 +70,11 @@ void __thermal_cdev_update(struct thermal_cooling_device *cdev);
/**
* struct thermal_trip - representation of a point in temperature domain
- * @np: pointer to struct device_node that this trip point was created from
* @temperature: temperature value in miliCelsius
* @hysteresis: relative hysteresis in miliCelsius
* @type: trip point type
*/
struct thermal_trip {
- struct device_node *np;
int temperature;
int hysteresis;
enum thermal_trip_type type;
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index d8b4a0ad2d5f..a8a3cb309822 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -855,10 +855,6 @@ static int thermal_of_populate_trip(struct device_node *np,
return ret;
}
- /* Required for cooling map matching */
- trip->np = np;
- of_node_get(np);
-
return 0;
}
@@ -988,8 +984,6 @@ __init *thermal_of_build_thermal_zone(struct device_node *np)
kfree(tz->tbps);
free_trips:
- for (i = 0; i < tz->ntrips; i++)
- of_node_put(tz->trips[i].np);
kfree(tz->trips);
of_node_put(gchild);
free_tz:
@@ -1014,8 +1008,6 @@ static __init void of_thermal_free_zone(struct __thermal_zone *tz)
}
kfree(tz->tbps);
- for (i = 0; i < tz->ntrips; i++)
- of_node_put(tz->trips[i].np);
kfree(tz->trips);
kfree(tz);
}
--
2.25.1
Powered by blists - more mailing lists