Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 81caa5d

Browse files
committed
thermal: imx: Drop critical trip check from imx_set_trip_temp()
Because the IMX thermal driver does not flag its critical trip as writable, imx_set_trip_temp() will never be invoked for it and so the critical trip check can be dropped from there. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/2272035.iZASKD2KPV@rjwysocki.net
1 parent d1fbf18 commit 81caa5d

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

drivers/thermal/imx_thermal.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -335,21 +335,12 @@ static int imx_set_trip_temp(struct thermal_zone_device *tz, int trip_id,
335335
int temp)
336336
{
337337
struct imx_thermal_data *data = thermal_zone_device_priv(tz);
338-
struct thermal_trip trip;
339338
int ret;
340339

341340
ret = pm_runtime_resume_and_get(data->dev);
342341
if (ret < 0)
343342
return ret;
344343

345-
ret = __thermal_zone_get_trip(tz, trip_id, &trip);
346-
if (ret)
347-
return ret;
348-
349-
/* do not allow changing critical threshold */
350-
if (trip.type == THERMAL_TRIP_CRITICAL)
351-
return -EPERM;
352-
353344
/* do not allow passive to be set higher than critical */
354345
if (temp < 0 || temp > trips[IMX_TRIP_CRITICAL].temperature)
355346
return -EINVAL;

0 commit comments

Comments
 (0)