diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-07-02 16:43:36 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-07-10 13:33:33 +0200 |
commit | 81caa5d519a2e5573e0763630a503def7cb480a5 (patch) | |
tree | 0e2f33e580f0b330067b17b9fbbdfaeaee860adb /drivers/thermal | |
parent | d1fbf18a0f9403df2edeffa1c7f5a2d66e82c20a (diff) | |
download | lwn-81caa5d519a2e5573e0763630a503def7cb480a5.tar.gz lwn-81caa5d519a2e5573e0763630a503def7cb480a5.zip |
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
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/imx_thermal.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 83eaae5ca3b8..c90f28ee4698 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -335,21 +335,12 @@ static int imx_set_trip_temp(struct thermal_zone_device *tz, int trip_id, int temp) { struct imx_thermal_data *data = thermal_zone_device_priv(tz); - struct thermal_trip trip; int ret; ret = pm_runtime_resume_and_get(data->dev); if (ret < 0) return ret; - ret = __thermal_zone_get_trip(tz, trip_id, &trip); - if (ret) - return ret; - - /* do not allow changing critical threshold */ - if (trip.type == THERMAL_TRIP_CRITICAL) - return -EPERM; - /* do not allow passive to be set higher than critical */ if (temp < 0 || temp > trips[IMX_TRIP_CRITICAL].temperature) return -EINVAL; |