From 23fa18eaa71266feff7ba8d83022d9e1cc83c65a Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 07:42:03 +0000
Subject: [PATCH] disable pwm7

---
 kernel/drivers/input/touchscreen/cyttsp5/cyttsp5_core.c |   36 +-----------------------------------
 1 files changed, 1 insertions(+), 35 deletions(-)

diff --git a/kernel/drivers/input/touchscreen/cyttsp5/cyttsp5_core.c b/kernel/drivers/input/touchscreen/cyttsp5/cyttsp5_core.c
index 5dccaa1..7fac39a 100644
--- a/kernel/drivers/input/touchscreen/cyttsp5/cyttsp5_core.c
+++ b/kernel/drivers/input/touchscreen/cyttsp5/cyttsp5_core.c
@@ -1710,11 +1710,6 @@
 	if (length < read_length)
 		length = read_length;
 
-	if (length + 10 > CY_MAX_INPUT) {
-		dev_err(cd->dev, "%s:%d: size=%d is larger than the max %d!!!\n",
-			__func__, __LINE__, length + 10, CY_MAX_INPUT);
-		return -EINVAL;
-	}
 	memcpy(read_buf, &cd->response_buf[10], length);
 	*crc = get_unaligned_le16(&cd->response_buf[read_length + 10]);
 
@@ -2486,11 +2481,6 @@
 	if (!data_len)
 		return -EPROTO;
 
-	if (data_len + 8 > CY_MAX_INPUT) {
-		dev_err(cd->dev, "%s:%d: size=%d is larger than the max %d!!!\n",
-			__func__, __LINE__, data_len, CY_MAX_INPUT);
-		return -EINVAL;
-	}
 	memcpy(return_data, &cd->response_buf[8], data_len);
 
 	return 0;
@@ -3884,12 +3874,6 @@
 		tthe_print(cd, cd->input_buf, size, "OpModeData=");
 #endif
 
-	if (si->desc.tch_header_size > CY_MAX_INPUT) {
-		dev_err(cd->dev, "%s:%d: size=%d is larger than the max %d!!!\n",
-			__func__, __LINE__, si->desc.tch_header_size, CY_MAX_INPUT);
-		return -EINVAL;
-	}
-
 	memcpy(si->xy_mode, cd->input_buf, si->desc.tch_header_size);
 	cyttsp5_pr_buf(cd->dev, (u8 *)si->xy_mode, si->desc.tch_header_size,
 			"xy_mode");
@@ -3900,13 +3884,6 @@
 		num_cur_tch = max_tch;
 
 	length = num_cur_tch * si->desc.tch_record_size;
-
-	if ((length + si->desc.tch_header_size) > CY_MAX_INPUT) {
-		dev_err(cd->dev, "%s:%d: size=%d is larger than the max %d!!!\n",
-			__func__, __LINE__, length + si->desc.tch_header_size,
-			CY_MAX_INPUT);
-		return -EINVAL;
-	}
 
 	memcpy(si->xy_data, &cd->input_buf[si->desc.tch_header_size], length);
 	cyttsp5_pr_buf(cd->dev, (u8 *)si->xy_data, length, "xy_data");
@@ -3954,12 +3931,6 @@
 	parade_debug(cd->dev, DEBUG_LEVEL_2, "%s: Received cmd interrupt\n",
 		__func__);
 
-	if (size > CY_MAX_INPUT) {
-		dev_err(cd->dev, "%s:%d: size=%d is larger than the max %d!!!\n",
-			__func__, __LINE__, size, CY_MAX_INPUT);
-		return -EINVAL;
-	}
-
 	memcpy(cd->response_buf, cd->input_buf, size);
 
 	mutex_lock(&cd->system_lock);
@@ -4002,17 +3973,12 @@
 		wake_up(&cd->wait_q);
 		mutex_unlock(&cd->system_lock);
 		return 0;
-	} else if (size == 2 || size >= CY_PIP_1P7_EMPTY_BUF || size > CY_MAX_INPUT) {
+	} else if (size == 2 || size >= CY_PIP_1P7_EMPTY_BUF)
 		/*
 		 * Before PIP 1.7, empty buffer is 0x0002;
 		 * From PIP 1.7, empty buffer is 0xFFXX
 		 */
-		if (size > CY_MAX_INPUT && size < CY_PIP_1P7_EMPTY_BUF)
-			dev_err(cd->dev, "%s:%d: size=%d is larger than the max %d!!!\n",
-				__func__, __LINE__, size, CY_MAX_INPUT);
-
 		return 0;
-	}
 
 	report_id = cd->input_buf[2];
 	parade_debug(cd->dev, DEBUG_LEVEL_2, "%s: report_id:%X\n",

--
Gitblit v1.6.2