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

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

Merge "input: touchscreen: fts: allow fingerprint aoi disablem"

parents f22ed7ce b1351ef7
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -48,19 +48,24 @@ ssize_t aoi_set_store(struct device *dev, struct device_attribute *attr,
	if (ret != 4)
		return -EINVAL;

	if (left < 0 || left > X_AXIS_MAX || right < 0 || right > X_AXIS_MAX) {
	if (right > X_AXIS_MAX)
		right = X_AXIS_MAX;
	if (bottom > Y_AXIS_MAX)
		bottom = Y_AXIS_MAX;

	if (left < 0 || left > X_AXIS_MAX || right < 0) {
		info->aoi_notify_enabled = false;
		return -EINVAL;
	}

	if (top < 0 || top > Y_AXIS_MAX || bottom < 0 || bottom > Y_AXIS_MAX) {
	if (top < 0 || top > Y_AXIS_MAX || bottom < 0) {
		info->aoi_notify_enabled = false;
		return -EINVAL;
	}

	if (left >= right || top >= bottom) {
		info->aoi_notify_enabled = false;
		return -EINVAL;
		return count;
	}

	info->aoi_left = left;