diff mbox series

[thermal:,thermal/next] thermal/of: Remove of_thermal_set_trip_hyst()

Message ID 167059959380.4906.14762586318894067457.tip-bot2@tip-bot2 (mailing list archive)
State Not Applicable, archived
Headers show
Series [thermal:,thermal/next] thermal/of: Remove of_thermal_set_trip_hyst() | expand

Commit Message

tip-bot2 for Kirill A. Shutemov Dec. 9, 2022, 3:26 p.m. UTC
The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     f00295bf50b581ecda6fad24dd8d713c2158e5da
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//f00295bf50b581ecda6fad24dd8d713c2158e5da
Author:        Daniel Lezcano <daniel.lezcano@linaro.org>
AuthorDate:    Mon, 03 Oct 2022 11:25:51 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Thu, 08 Dec 2022 14:30:42 +01:00

thermal/of: Remove of_thermal_set_trip_hyst()

The thermal core is providing the generic thermal_zone_set_trip()
function which does exactly what the OF ops function is doing.

It is pointless to define our own version, just remove the ops and the
thermal_zone_set_trip() will take care of it.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20221003092602.1323944-19-daniel.lezcano@linaro.org
---
 drivers/thermal/thermal_of.c | 13 -------------
 1 file changed, 13 deletions(-)
diff mbox series

Patch

diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index 4e54d62..494e9c3 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -19,18 +19,6 @@ 
 
 #include "thermal_core.h"
 
-static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip,
-				    int hyst)
-{
-	if (trip >= tz->num_trips || trip < 0)
-		return -EDOM;
-
-	/* thermal framework should take care of data->mask & (1 << trip) */
-	tz->trips[trip].hysteresis = hyst;
-
-	return 0;
-}
-
 static int of_thermal_get_crit_temp(struct thermal_zone_device *tz,
 				    int *temp)
 {
@@ -541,7 +529,6 @@  struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor,
 		goto out_kfree_trips;
 	}
 
-	of_ops->set_trip_hyst = of_ops->set_trip_hyst ? : of_thermal_set_trip_hyst;
 	of_ops->get_crit_temp = of_ops->get_crit_temp ? : of_thermal_get_crit_temp;
 	of_ops->bind = thermal_of_bind;
 	of_ops->unbind = thermal_of_unbind;