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

Commit 44e5d3d4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: thermal: Update mitigation state reading logic from devicetree"

parents 30aa70d8 cd3ed41b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1565,7 +1565,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
	 * based on the MACRO determine the default state to use or the
	 * based on the MACRO determine the default state to use or the
	 * offset from the max_state.
	 * offset from the max_state.
	 */
	 */
	if (upper > (THERMAL_MAX_LIMIT - max_state)) {
	if (upper >= (THERMAL_MAX_LIMIT - max_state)) {
		/* upper default max_state */
		/* upper default max_state */
		if (upper == THERMAL_NO_LIMIT)
		if (upper == THERMAL_NO_LIMIT)
			upper = max_state;
			upper = max_state;
@@ -1573,7 +1573,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
			upper = max_state - (THERMAL_MAX_LIMIT - upper);
			upper = max_state - (THERMAL_MAX_LIMIT - upper);
	}
	}


	if (lower > (THERMAL_MAX_LIMIT - max_state)) {
	if (lower >= (THERMAL_MAX_LIMIT - max_state)) {
		/* lower default 0 */
		/* lower default 0 */
		if (lower == THERMAL_NO_LIMIT)
		if (lower == THERMAL_NO_LIMIT)
			lower = 0;
			lower = 0;