From: lw Date: Wed, 1 Aug 2012 12:07:50 +0000 (+0800) Subject: phonepad:fix touch screen driver bug X-Git-Tag: firefly_0821_release~8935 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=db120561242604acd4cbf1ba1d9bb2cc0debf77f;p=firefly-linux-kernel-4.4.55.git phonepad:fix touch screen driver bug --- diff --git a/arch/arm/configs/rk30_phonepad_defconfig b/arch/arm/configs/rk30_phonepad_defconfig index be3bdf5d9102..b9bf49c0d65e 100644 --- a/arch/arm/configs/rk30_phonepad_defconfig +++ b/arch/arm/configs/rk30_phonepad_defconfig @@ -227,6 +227,7 @@ CONFIG_INPUT_KEYRESET=y CONFIG_INPUT_JOYSTICK=y CONFIG_INPUT_TABLET=y CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_GT82X_IIC=y CONFIG_INPUT_MISC=y CONFIG_INPUT_KEYCHORD=y CONFIG_INPUT_UINPUT=y diff --git a/drivers/input/touchscreen/goodix_touch_82x.c b/drivers/input/touchscreen/goodix_touch_82x.c index a665c033ea7d..b745f3c3e41a 100755 --- a/drivers/input/touchscreen/goodix_touch_82x.c +++ b/drivers/input/touchscreen/goodix_touch_82x.c @@ -804,7 +804,6 @@ static s32 goodix_ts_probe(struct i2c_client *client, const struct i2c_device_id //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) @@ -815,7 +814,7 @@ static s32 goodix_ts_probe(struct i2c_client *client, const struct i2c_device_id { 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"); @@ -832,7 +831,7 @@ static s32 goodix_ts_probe(struct i2c_client *client, const struct i2c_device_id { 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