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

Commit bb191951 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 7ea56f32 dc2689a9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -217,13 +217,15 @@ static int of_thermal_set_trips(struct thermal_zone_device *tz,
		return -EINVAL;

	mutex_lock(&data->senps->lock);
	if (data->mode == THERMAL_DEVICE_DISABLED)
		goto set_trips_exit;
	of_thermal_aggregate_trip_types(tz, GENMASK(THERMAL_TRIP_CRITICAL, 0),
					&low, &high);
	data->senps->trip_low = low;
	data->senps->trip_high = high;
	ret = data->senps->ops->set_trips(data->senps->sensor_data,
					  low, high);

set_trips_exit:
	mutex_unlock(&data->senps->lock);
	return ret;
}