phonepad:fix touch screen driver bug
authorlw <lw@rock-chips.com>
Wed, 1 Aug 2012 12:07:50 +0000 (20:07 +0800)
committerlw <lw@rock-chips.com>
Wed, 1 Aug 2012 12:07:50 +0000 (20:07 +0800)
arch/arm/configs/rk30_phonepad_defconfig
drivers/input/touchscreen/goodix_touch_82x.c

index be3bdf5d910254208d166ebb0c7d5fd8229c32ab..b9bf49c0d65e0e39ffc79cff292fbba4a558fbc3 100644 (file)
@@ -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
index a665c033ea7df3e76eadb941615d14ad7250e212..b745f3c3e41a9ba89459d0791411e9e6f71207bb 100755 (executable)
@@ -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