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

Commit 5f28b859 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: Avoid race condition in updating the cooling device"

parents ca2a1746 e30952e4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1325,9 +1325,11 @@ thermal_cooling_device_cur_state_store(struct device *dev,
	if ((long)state < 0)
		return -EINVAL;

	mutex_lock(&cdev->lock);
	cdev->sysfs_cur_state_req = state;

	cdev->updated = false;
	mutex_unlock(&cdev->lock);
	thermal_cdev_update(cdev);

	return count;
@@ -1349,9 +1351,11 @@ thermal_cooling_device_min_state_store(struct device *dev,
	if ((long)state < 0)
		return -EINVAL;

	mutex_lock(&cdev->lock);
	cdev->sysfs_min_state_req = state;

	cdev->updated = false;
	mutex_unlock(&cdev->lock);
	thermal_cdev_update(cdev);

	return count;