[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220426221523.3056696-14-daniel.lezcano@linexp.org>
Date: Wed, 27 Apr 2022 00:15:21 +0200
From: Daniel Lezcano <daniel.lezcano@...exp.org>
To: rafael@...nel.org, daniel.lezcano@...aro.org
Cc: khilman@...libre.com, abailon@...libre.com,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 13/15] thermal/of: Store the trips in the thermal zone
As the thermal zone contains the trip point, we can store them
directly in the when registering the thermal zone. That will allow
another step forward to remove the duplicate thermal zone structure we
find in the thermal_of code.
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_of.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index 25ec70c8b7ed..069b421a54ae 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -1105,11 +1105,9 @@ int __init of_parse_thermal_zones(void)
tzp->slope = tz->slope;
tzp->offset = tz->offset;
- zone = thermal_zone_register(child->name, tz->ntrips,
- mask, tz,
- ops, tzp,
- tz->passive_delay,
- tz->polling_delay);
+ zone = thermal_zone_register_with_trips(child->name, tz->trips, tz->ntrips,
+ mask, tz, ops, tzp, tz->passive_delay,
+ tz->polling_delay);
if (IS_ERR(zone)) {
pr_err("Failed to build %pOFn zone %ld\n", child,
PTR_ERR(zone));
--
2.25.1
Powered by blists - more mailing lists