Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80315609 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: thermal: Avoid trip evaluation for disabled thermal zone"

parents 1ac8a0b1 7c99000a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -190,6 +190,9 @@ static int of_thermal_set_trips(struct thermal_zone_device *tz,
	if (!data->senps[0] || !data->senps[0]->ops->set_trips)
		return -EINVAL;

	if (data->mode == THERMAL_DEVICE_DISABLED)
		return ret;

	mutex_lock(&data->senps[0]->lock);
	of_thermal_aggregate_trip_types(tz, data->senps[0],
					GENMASK(THERMAL_TRIP_CRITICAL, 0),