input: touchscreen: fix issues related to variable initialization
Fix issues related to variable initialization in FTS touchscreen driver. Change-Id: I2911787dd1e1979e027bacdd1bc1cec06845ffd3 Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
This commit is contained in:
parent
5d78c03af8
commit
bda70401dd
4 changed files with 14 additions and 14 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue