Browse Source

touch : raydium: resolve KW issues

resolved KW issues in raydium touch driver

Change-Id: I1e922389ade468aada9e5b3eda263f3afe1ff6dc
Signed-off-by: Surya Teja Kudiri <[email protected]>
Surya Teja Kudiri 2 years ago
parent
commit
e572c26f33
3 changed files with 24 additions and 24 deletions
  1. 2 2
      raydium/raydium_driver.c
  2. 21 21
      raydium/raydium_selftest.c
  3. 1 1
      raydium/raydium_sysfs.c

+ 2 - 2
raydium/raydium_driver.c

@@ -1188,8 +1188,8 @@ reset_error:
 static void raydium_work_handler(struct work_struct *work)
 {
 	int i32_ret = 0;
-	unsigned char u8_tp_status[MAX_TCH_STATUS_PACKET_SIZE];
-	unsigned char u8_buf[MAX_REPORT_PACKET_SIZE];
+	unsigned char u8_tp_status[MAX_TCH_STATUS_PACKET_SIZE] = {0};
+	unsigned char u8_buf[MAX_REPORT_PACKET_SIZE] = {0};
 
 #ifdef GESTURE_EN
 	unsigned char u8_i;

+ 21 - 21
raydium/raydium_selftest.c

@@ -253,106 +253,106 @@ int self_test_save_test_raw_data_to_file(int i32_ng_type)
 		memset(write_string, 0, strlen(write_string));
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_SYSFS_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "System NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_I2C_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "I2C NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_INT_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "INT NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_RESET_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "RESET NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_PRAM_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "PRAM NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_NORMAL_FW_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "NORMAL_FW_NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_OPEN_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "OPEN NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_SHORT_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "SHORT NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_BURN_CC_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "BURN CC NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_GET_DATA_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "GET DATA NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_FLASH_ID_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "FLASH ID NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_NORMAL_FW_VER_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "NORMAL FW VER NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_TEST_FW_VER_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "TEST FW VER NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_TEST_INIT_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "TEST INIT NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_LOAD_TESTFW_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "LOAD TESTFW NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_BURN_FW_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "BURN FW NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_SINGLE_CC_OPEN_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "Open NG (Single Pin CC) ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_SINGLE_CC_SHORT_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "Short NG (Single Pin CC) ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_UB_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "Uniformity Baseline NG ");
 		}
 
 		if (i32_ng_type & WEARABLE_FT_TEST_RESULT_UC_NG) {
-			snprintf(write_string + strlen(write_string),
+			snprintf(write_string,
 				RM_SELF_TEST_MAX_STR_LENGTH, "Uniformity CC NG ");
 		}
 
-		snprintf(write_string + strlen(write_string), RM_SELF_TEST_MAX_STR_LENGTH, "\n");
+		snprintf(write_string, RM_SELF_TEST_MAX_STR_LENGTH, "\n");
 		self_test_save_to_file(RM_SELF_TEST_LOGFILE, write_string, strlen(write_string));
 	}
 

+ 1 - 1
raydium/raydium_sysfs.c

@@ -1080,7 +1080,7 @@ static ssize_t raydium_receive_fw_store(struct device *dev,
 		free_token = token;
 		free_temp_buf = temp_buf;
 
-		snprintf(temp_buf, PAGE_SIZE, "%s", p_i8_buf);
+		snprintf(temp_buf, 32, "%s", p_i8_buf);
 		token = strsep(&temp_buf, delim);
 		i32_ret = kstrtou8(token, 16, &u8_cmd);
 		if (i32_ret < 0) {