diff mbox series

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

Message ID 167059959365.4906.10245141462546793374.tip-bot2@tip-bot2
State New
Headers show
Series [thermal:,thermal/next] thermal/of: Remove of_thermal_get_crit_temp() | expand

Commit Message

thermal-bot for Julien Panis Dec. 9, 2022, 3:26 p.m. UTC
The following commit has been merged into the thermal/next branch of thermal:

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

thermal/of: Remove of_thermal_get_crit_temp()

The generic version of of_thermal_get_crit_temp() can be used. Let's
remove this ops which is pointless.

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

Patch

diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index 494e9c3..bd87218 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -19,20 +19,6 @@ 
 
 #include "thermal_core.h"
 
-static int of_thermal_get_crit_temp(struct thermal_zone_device *tz,
-				    int *temp)
-{
-	int i;
-
-	for (i = 0; i < tz->num_trips; i++)
-		if (tz->trips[i].type == THERMAL_TRIP_CRITICAL) {
-			*temp = tz->trips[i].temperature;
-			return 0;
-		}
-
-	return -EINVAL;
-}
-
 /***   functions parsing device tree nodes   ***/
 
 static int of_find_trip_id(struct device_node *np, struct device_node *trip)
@@ -529,7 +515,6 @@  struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor,
 		goto out_kfree_trips;
 	}
 
-	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;