Merge "input: touchscreen: fix issues related to variable initialization"

This commit is contained in:
Linux Build Service Account 2017-05-05 09:10:04 -07:00 committed by Gerrit - the friendly Code Review server
commit e04e7d0f39
4 changed files with 14 additions and 14 deletions

View file

@ -1252,7 +1252,7 @@ static void fts_event_handler(struct work_struct *work)
static int cx_crc_check(void) static int cx_crc_check(void)
{ {
unsigned char regAdd1[3] = {FTS_CMD_HW_REG_R, ADDR_CRC_BYTE0, ADDR_CRC_BYTE1}; unsigned char regAdd1[3] = {FTS_CMD_HW_REG_R, ADDR_CRC_BYTE0, ADDR_CRC_BYTE1};
unsigned char val; unsigned char val = 0;
unsigned char crc_status; unsigned char crc_status;
unsigned int error; unsigned int error;

View file

@ -93,7 +93,7 @@ int getFirmwareVersion(u16 *fw_vers, u16 *config_id)
int flash_status(void) int flash_status(void)
{ {
u8 cmd[2] = {FLASH_CMD_READSTATUS, 0x00}; u8 cmd[2] = {FLASH_CMD_READSTATUS, 0x00};
u8 readData; u8 readData = 0;
logError(0, "%s Reading flash_status...\n", tag); logError(0, "%s Reading flash_status...\n", tag);
if (fts_readCmd(cmd, 2, &readData, FLASH_STATUS_BYTES) < 0) { if (fts_readCmd(cmd, 2, &readData, FLASH_STATUS_BYTES) < 0) {

View file

@ -28,7 +28,7 @@ static u8 custom_gesture_index[GESTURE_CUSTOM_NUMBER] = { 0 };
int enableGesture(u8 *mask, int size) int enableGesture(u8 *mask, int size)
{ {
u8 cmd[size+2]; u8 cmd[size+2];
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
int i, res; int i, res;
int event_to_search[4] = {EVENTID_GESTURE, EVENT_TYPE_ENB, 0x00, GESTURE_ENABLE}; int event_to_search[4] = {EVENTID_GESTURE, EVENT_TYPE_ENB, 0x00, GESTURE_ENABLE};
@ -82,7 +82,7 @@ int enableGesture(u8 *mask, int size)
int disableGesture(u8 *mask, int size) int disableGesture(u8 *mask, int size)
{ {
u8 cmd[2+GESTURE_MASK_SIZE]; u8 cmd[2+GESTURE_MASK_SIZE];
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
u8 temp; u8 temp;
int i, res; int i, res;
int event_to_search[4] = { EVENTID_GESTURE, EVENT_TYPE_ENB, 0x00, GESTURE_DISABLE }; int event_to_search[4] = { EVENTID_GESTURE, EVENT_TYPE_ENB, 0x00, GESTURE_DISABLE };
@ -141,7 +141,7 @@ int startAddCustomGesture(u8 gestureID)
{ {
u8 cmd[3] = { FTS_CMD_GESTURE_CMD, GESTURE_START_ADD, gestureID }; u8 cmd[3] = { FTS_CMD_GESTURE_CMD, GESTURE_START_ADD, gestureID };
int res; int res;
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
int event_to_search[4] = { EVENTID_GESTURE, EVENT_TYPE_ENB, gestureID, GESTURE_START_ADD }; int event_to_search[4] = { EVENTID_GESTURE, EVENT_TYPE_ENB, gestureID, GESTURE_START_ADD };
res = fts_writeFwCmd(cmd, 3); res = fts_writeFwCmd(cmd, 3);
@ -168,7 +168,7 @@ int finishAddCustomGesture(u8 gestureID)
{ {
u8 cmd[3] = { FTS_CMD_GESTURE_CMD, GESTURE_FINISH_ADD, gestureID }; u8 cmd[3] = { FTS_CMD_GESTURE_CMD, GESTURE_FINISH_ADD, gestureID };
int res; int res;
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
int event_to_search[4] = { EVENTID_GESTURE, EVENT_TYPE_ENB, gestureID, GESTURE_FINISH_ADD }; int event_to_search[4] = { EVENTID_GESTURE, EVENT_TYPE_ENB, gestureID, GESTURE_FINISH_ADD };
res = fts_writeFwCmd(cmd, 3); res = fts_writeFwCmd(cmd, 3);
@ -199,7 +199,7 @@ int loadCustomGesture(u8 *template, u8 gestureID)
int toWrite, offset = 0; int toWrite, offset = 0;
u8 cmd[TEMPLATE_CHUNK + 5]; u8 cmd[TEMPLATE_CHUNK + 5];
int event_to_search[4] = { EVENTID_GESTURE, EVENT_TYPE_ENB, gestureID, GESTURE_DATA_ADD }; int event_to_search[4] = { EVENTID_GESTURE, EVENT_TYPE_ENB, gestureID, GESTURE_DATA_ADD };
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
logError(0, "%s Starting adding custom gesture procedure...\n", tag); logError(0, "%s Starting adding custom gesture procedure...\n", tag);
@ -359,7 +359,7 @@ int removeCustomGesture(u8 gestureID)
int res, index; int res, index;
u8 cmd[3] = { FTS_CMD_GESTURE_CMD, GETURE_REMOVE_CUSTOM, gestureID }; u8 cmd[3] = { FTS_CMD_GESTURE_CMD, GETURE_REMOVE_CUSTOM, gestureID };
int event_to_search[4] = {EVENTID_GESTURE, EVENT_TYPE_ENB, gestureID, GETURE_REMOVE_CUSTOM }; int event_to_search[4] = {EVENTID_GESTURE, EVENT_TYPE_ENB, gestureID, GETURE_REMOVE_CUSTOM };
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
index = gestureID - GESTURE_CUSTOM_OFFSET; index = gestureID - GESTURE_CUSTOM_OFFSET;

View file

@ -301,7 +301,7 @@ int production_test_ito(void)
{ {
int res = OK; int res = OK;
u8 cmd; u8 cmd;
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
int eventToSearch[2] = {EVENTID_ERROR_EVENT, EVENT_TYPE_ITO}; /* look for ito event */ int eventToSearch[2] = {EVENTID_ERROR_EVENT, EVENT_TYPE_ITO}; /* look for ito event */
logError(0, "%s ITO Production test is starting...\n", tag); logError(0, "%s ITO Production test is starting...\n", tag);
@ -347,7 +347,7 @@ int production_test_initialization(void)
{ {
int res; int res;
u8 cmd; u8 cmd;
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
int eventToSearch[2] = {EVENTID_STATUS_UPDATE, EVENT_TYPE_FULL_INITIALIZATION}; int eventToSearch[2] = {EVENTID_STATUS_UPDATE, EVENT_TYPE_FULL_INITIALIZATION};
logError(0, "%s INITIALIZATION Production test is starting...\n", tag); logError(0, "%s INITIALIZATION Production test is starting...\n", tag);
@ -397,7 +397,7 @@ int ms_compensation_tuning(void)
{ {
int res; int res;
u8 cmd; u8 cmd;
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
int eventToSearch[2] = {EVENTID_STATUS_UPDATE, EVENT_TYPE_MS_TUNING_CMPL}; int eventToSearch[2] = {EVENTID_STATUS_UPDATE, EVENT_TYPE_MS_TUNING_CMPL};
logError(0, "%s MS INITIALIZATION command sent...\n", tag); logError(0, "%s MS INITIALIZATION command sent...\n", tag);
@ -429,7 +429,7 @@ int ss_compensation_tuning(void)
{ {
int res; int res;
u8 cmd; u8 cmd;
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
int eventToSearch[2] = {EVENTID_STATUS_UPDATE, EVENT_TYPE_SS_TUNING_CMPL}; int eventToSearch[2] = {EVENTID_STATUS_UPDATE, EVENT_TYPE_SS_TUNING_CMPL};
logError(0, "%s SS INITIALIZATION command sent...\n", tag); logError(0, "%s SS INITIALIZATION command sent...\n", tag);
@ -461,7 +461,7 @@ int lp_timer_calibration(void)
{ {
int res; int res;
u8 cmd; u8 cmd;
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
int eventToSearch[2] = {EVENTID_STATUS_UPDATE, EVENT_TYPE_LPTIMER_TUNING_CMPL}; int eventToSearch[2] = {EVENTID_STATUS_UPDATE, EVENT_TYPE_LPTIMER_TUNING_CMPL};
logError(0, "%s LP TIMER CALIBRATION command sent...\n", tag); logError(0, "%s LP TIMER CALIBRATION command sent...\n", tag);
@ -493,7 +493,7 @@ int save_cx_tuning(void)
{ {
int res; int res;
u8 cmd; u8 cmd;
u8 readData[FIFO_EVENT_SIZE]; u8 readData[FIFO_EVENT_SIZE] = {0};
int eventToSearch[2] = {EVENTID_STATUS_UPDATE, EVENT_TYPE_COMP_DATA_SAVED}; int eventToSearch[2] = {EVENTID_STATUS_UPDATE, EVENT_TYPE_COMP_DATA_SAVED};
logError(0, "%s SAVE CX command sent...\n", tag); logError(0, "%s SAVE CX command sent...\n", tag);