diff mbox series

[v2,1/2] thermal/drivers/imx: Remove get_trip_temp ops

Message ID 20230309092821.1590586-1-daniel.lezcano@linaro.org (mailing list archive)
State New, archived
Delegated to: Daniel Lezcano
Headers show
Series [v2,1/2] thermal/drivers/imx: Remove get_trip_temp ops | expand

Commit Message

Daniel Lezcano March 9, 2023, 9:28 a.m. UTC
The i.MX thermal sensor uses the generic trip points. The thermal
framework can return the critical temperature directly.

Remove the pointless get_trip_temp ops.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/thermal/imx_thermal.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Fabio Estevam March 9, 2023, 10:44 a.m. UTC | #1
On Thu, Mar 9, 2023 at 6:28 AM Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
>
> The i.MX thermal sensor uses the generic trip points. The thermal
> framework can return the critical temperature directly.
>
> Remove the pointless get_trip_temp ops.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Reviewed-by: Fabio Estevam <festevam@gmail.com>
Daniel Lezcano March 13, 2023, 10:53 a.m. UTC | #2
On 09/03/2023 10:28, Daniel Lezcano wrote:
> The i.MX thermal sensor uses the generic trip points. The thermal
> framework can return the critical temperature directly.
> 
> Remove the pointless get_trip_temp ops.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index c3136978adee..69ed482167f7 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -330,13 +330,6 @@  static int imx_change_mode(struct thermal_zone_device *tz,
 	return 0;
 }
 
-static int imx_get_crit_temp(struct thermal_zone_device *tz, int *temp)
-{
-	*temp = trips[IMX_TRIP_CRITICAL].temperature;
-
-	return 0;
-}
-
 static int imx_set_trip_temp(struct thermal_zone_device *tz, int trip,
 			     int temp)
 {
@@ -384,7 +377,6 @@  static struct thermal_zone_device_ops imx_tz_ops = {
 	.unbind = imx_unbind,
 	.get_temp = imx_get_temp,
 	.change_mode = imx_change_mode,
-	.get_crit_temp = imx_get_crit_temp,
 	.set_trip_temp = imx_set_trip_temp,
 };