//Test I2C connection.
// GTDEBUG_MSG("GT82X++++++ Testing I2C connection...\n");
for(retry = 0;retry < 3; retry++)
- while(1) //For GTDEBUG use!
{
ret = i2c_pre_cmd(ts);
if (ret > 0)
{
dev_err(&client->dev, "Warnning: I2C communication might be ERROR!\n");
GTDEBUG_MSG("I2C test failed. I2C addr:%x\n", client->addr);
- goodix_ts_remove(ts->client); kfree(ts);
+ goodix_ts_remove(ts->client);
return -1;
}
// printk("gt82x---777777777777777\n");
{
ts->bad_data=1;
GTDEBUG_MSG("Initialize failed!\n");
- goodix_ts_remove(ts->client); kfree(ts);
+ goodix_ts_remove(ts->client);
return -1;
}
//Enable interrupt