Loading drivers/input/touchscreen/gt9xx/gt9xx.c +14 −15 Original line number Diff line number Diff line Loading @@ -973,7 +973,8 @@ static int gtp_init_panel(struct goodix_ts_data *ts) } } /* !DRIVER NOT SEND CONFIG */ if ((ts->abs_x_max == 0) && (ts->abs_y_max == 0)) { if ((ts->abs_x_max == 0) && (ts->abs_y_max == 0) && (config_data != NULL)) { ts->abs_x_max = (config_data[RESOLUTION_LOC + 1] << 8) + config_data[RESOLUTION_LOC]; ts->abs_y_max = (config_data[RESOLUTION_LOC + 3] << 8) Loading Loading @@ -2120,8 +2121,8 @@ exit_free_irq: flush_workqueue(ts->goodix_wq); destroy_workqueue(ts->goodix_wq); input_unregister_device(ts->input_dev); if (ts->input_dev) { input_unregister_device(ts->input_dev); input_free_device(ts->input_dev); ts->input_dev = NULL; } Loading Loading @@ -2155,12 +2156,11 @@ static int goodix_ts_remove(struct i2c_client *client) { struct goodix_ts_data *ts = i2c_get_clientdata(client); if (ts) { sysfs_remove_group(&ts->input_dev->dev.kobj, >p_attr_grp); #if defined(CONFIG_FB) if (fb_unregister_client(&ts->fb_notif)) dev_err(&client->dev, "Error occurred while unregistering fb_notifier.\n"); fb_unregister_client(&ts->fb_notif); #elif defined(CONFIG_HAS_EARLYSUSPEND) unregister_early_suspend(&ts->early_suspend); #endif Loading @@ -2176,7 +2176,6 @@ static int goodix_ts_remove(struct i2c_client *client) destroy_workqueue(gtp_esd_check_workqueue); #endif if (ts) { if (ts->use_irq) free_irq(client->irq, ts); Loading @@ -2184,8 +2183,8 @@ static int goodix_ts_remove(struct i2c_client *client) flush_workqueue(ts->goodix_wq); destroy_workqueue(ts->goodix_wq); input_unregister_device(ts->input_dev); if (ts->input_dev) { input_unregister_device(ts->input_dev); input_free_device(ts->input_dev); ts->input_dev = NULL; } Loading @@ -2198,8 +2197,8 @@ static int goodix_ts_remove(struct i2c_client *client) goodix_power_off(ts); goodix_power_deinit(ts); i2c_set_clientdata(client, NULL); } debugfs_remove_recursive(ts->debug_base); } return 0; } Loading drivers/input/touchscreen/gt9xx/gt9xx_update.c +8 −60 Original line number Diff line number Diff line Loading @@ -953,27 +953,14 @@ static u8 gup_burn_dsp_isp(struct i2c_client *client) { s32 ret = 0; u8 *fw_dsp_isp = NULL; u8 retry = 0; pr_debug("Begin burn dsp isp."); /* step1:alloc memory */ pr_debug("step1:alloc memory"); while (retry++ < 5) { fw_dsp_isp = devm_kzalloc(&client->dev, FW_DSP_ISP_LENGTH, GFP_KERNEL); if (fw_dsp_isp == NULL) { continue; } else { pr_info("Alloc %dk byte memory success.", (FW_DSP_ISP_LENGTH/1024)); break; } } if (retry == 5) { pr_err("Alloc memory fail,exit."); fw_dsp_isp = devm_kzalloc(&client->dev, FW_DSP_ISP_LENGTH, GFP_KERNEL); if (fw_dsp_isp == NULL) return FAIL; } /* step2:load dsp isp file data */ pr_debug("step2:load dsp isp file data"); Loading Loading @@ -1059,28 +1046,15 @@ static u8 gup_burn_dsp_isp(struct i2c_client *client) static u8 gup_burn_fw_ss51(struct i2c_client *client) { u8 *fw_ss51 = NULL; u8 retry = 0; s32 ret = 0; pr_debug("Begin burn ss51 firmware."); /* step1:alloc memory */ pr_debug("step1:alloc memory"); while (retry++ < 5) { fw_ss51 = devm_kzalloc(&client->dev, FW_SECTION_LENGTH, GFP_KERNEL); if (fw_ss51 == NULL) { continue; } else { pr_info("Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); break; } } if (retry == 5) { pr_err("Alloc memory fail,exit."); fw_ss51 = devm_kzalloc(&client->dev, FW_SECTION_LENGTH, GFP_KERNEL); if (fw_ss51 == NULL) return FAIL; } /* step2:load ss51 firmware section 1 file data */ pr_debug("step2:load ss51 firmware section 1 file data"); Loading Loading @@ -1164,27 +1138,14 @@ static u8 gup_burn_fw_dsp(struct i2c_client *client) { s32 ret = 0; u8 *fw_dsp = NULL; u8 retry = 0; u8 rd_buf[5]; pr_debug("Begin burn dsp firmware."); /* step1:alloc memory */ pr_debug("step1:alloc memory"); while (retry++ < 5) { fw_dsp = devm_kzalloc(&client->dev, FW_DSP_LENGTH, GFP_KERNEL); if (fw_dsp == NULL) { continue; } else { pr_info("Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); break; } } if (retry == 5) { pr_err("Alloc memory fail,exit."); fw_dsp = devm_kzalloc(&client->dev, FW_DSP_LENGTH, GFP_KERNEL); if (fw_dsp == NULL) return FAIL; } /* step2:load firmware dsp */ pr_debug("step2:load firmware dsp"); Loading Loading @@ -1268,28 +1229,15 @@ static u8 gup_burn_fw_boot(struct i2c_client *client) { s32 ret = 0; u8 *fw_boot = NULL; u8 retry = 0; u8 rd_buf[5]; pr_debug("Begin burn bootloader firmware."); /* step1:Alloc memory */ pr_debug("step1:Alloc memory"); while (retry++ < 5) { fw_boot = devm_kzalloc(&client->dev, FW_BOOT_LENGTH, GFP_KERNEL); if (fw_boot == NULL) { continue; } else { pr_info("Alloc %dk byte memory success.", (FW_BOOT_LENGTH/1024)); break; } } if (retry == 5) { pr_err("Alloc memory fail,exit."); fw_boot = devm_kzalloc(&client->dev, FW_BOOT_LENGTH, GFP_KERNEL); if (fw_boot == NULL) return FAIL; } /* step2:load firmware bootloader */ pr_debug("step2:load firmware bootloader"); Loading Loading
drivers/input/touchscreen/gt9xx/gt9xx.c +14 −15 Original line number Diff line number Diff line Loading @@ -973,7 +973,8 @@ static int gtp_init_panel(struct goodix_ts_data *ts) } } /* !DRIVER NOT SEND CONFIG */ if ((ts->abs_x_max == 0) && (ts->abs_y_max == 0)) { if ((ts->abs_x_max == 0) && (ts->abs_y_max == 0) && (config_data != NULL)) { ts->abs_x_max = (config_data[RESOLUTION_LOC + 1] << 8) + config_data[RESOLUTION_LOC]; ts->abs_y_max = (config_data[RESOLUTION_LOC + 3] << 8) Loading Loading @@ -2120,8 +2121,8 @@ exit_free_irq: flush_workqueue(ts->goodix_wq); destroy_workqueue(ts->goodix_wq); input_unregister_device(ts->input_dev); if (ts->input_dev) { input_unregister_device(ts->input_dev); input_free_device(ts->input_dev); ts->input_dev = NULL; } Loading Loading @@ -2155,12 +2156,11 @@ static int goodix_ts_remove(struct i2c_client *client) { struct goodix_ts_data *ts = i2c_get_clientdata(client); if (ts) { sysfs_remove_group(&ts->input_dev->dev.kobj, >p_attr_grp); #if defined(CONFIG_FB) if (fb_unregister_client(&ts->fb_notif)) dev_err(&client->dev, "Error occurred while unregistering fb_notifier.\n"); fb_unregister_client(&ts->fb_notif); #elif defined(CONFIG_HAS_EARLYSUSPEND) unregister_early_suspend(&ts->early_suspend); #endif Loading @@ -2176,7 +2176,6 @@ static int goodix_ts_remove(struct i2c_client *client) destroy_workqueue(gtp_esd_check_workqueue); #endif if (ts) { if (ts->use_irq) free_irq(client->irq, ts); Loading @@ -2184,8 +2183,8 @@ static int goodix_ts_remove(struct i2c_client *client) flush_workqueue(ts->goodix_wq); destroy_workqueue(ts->goodix_wq); input_unregister_device(ts->input_dev); if (ts->input_dev) { input_unregister_device(ts->input_dev); input_free_device(ts->input_dev); ts->input_dev = NULL; } Loading @@ -2198,8 +2197,8 @@ static int goodix_ts_remove(struct i2c_client *client) goodix_power_off(ts); goodix_power_deinit(ts); i2c_set_clientdata(client, NULL); } debugfs_remove_recursive(ts->debug_base); } return 0; } Loading
drivers/input/touchscreen/gt9xx/gt9xx_update.c +8 −60 Original line number Diff line number Diff line Loading @@ -953,27 +953,14 @@ static u8 gup_burn_dsp_isp(struct i2c_client *client) { s32 ret = 0; u8 *fw_dsp_isp = NULL; u8 retry = 0; pr_debug("Begin burn dsp isp."); /* step1:alloc memory */ pr_debug("step1:alloc memory"); while (retry++ < 5) { fw_dsp_isp = devm_kzalloc(&client->dev, FW_DSP_ISP_LENGTH, GFP_KERNEL); if (fw_dsp_isp == NULL) { continue; } else { pr_info("Alloc %dk byte memory success.", (FW_DSP_ISP_LENGTH/1024)); break; } } if (retry == 5) { pr_err("Alloc memory fail,exit."); fw_dsp_isp = devm_kzalloc(&client->dev, FW_DSP_ISP_LENGTH, GFP_KERNEL); if (fw_dsp_isp == NULL) return FAIL; } /* step2:load dsp isp file data */ pr_debug("step2:load dsp isp file data"); Loading Loading @@ -1059,28 +1046,15 @@ static u8 gup_burn_dsp_isp(struct i2c_client *client) static u8 gup_burn_fw_ss51(struct i2c_client *client) { u8 *fw_ss51 = NULL; u8 retry = 0; s32 ret = 0; pr_debug("Begin burn ss51 firmware."); /* step1:alloc memory */ pr_debug("step1:alloc memory"); while (retry++ < 5) { fw_ss51 = devm_kzalloc(&client->dev, FW_SECTION_LENGTH, GFP_KERNEL); if (fw_ss51 == NULL) { continue; } else { pr_info("Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); break; } } if (retry == 5) { pr_err("Alloc memory fail,exit."); fw_ss51 = devm_kzalloc(&client->dev, FW_SECTION_LENGTH, GFP_KERNEL); if (fw_ss51 == NULL) return FAIL; } /* step2:load ss51 firmware section 1 file data */ pr_debug("step2:load ss51 firmware section 1 file data"); Loading Loading @@ -1164,27 +1138,14 @@ static u8 gup_burn_fw_dsp(struct i2c_client *client) { s32 ret = 0; u8 *fw_dsp = NULL; u8 retry = 0; u8 rd_buf[5]; pr_debug("Begin burn dsp firmware."); /* step1:alloc memory */ pr_debug("step1:alloc memory"); while (retry++ < 5) { fw_dsp = devm_kzalloc(&client->dev, FW_DSP_LENGTH, GFP_KERNEL); if (fw_dsp == NULL) { continue; } else { pr_info("Alloc %dk byte memory success.", (FW_SECTION_LENGTH/1024)); break; } } if (retry == 5) { pr_err("Alloc memory fail,exit."); fw_dsp = devm_kzalloc(&client->dev, FW_DSP_LENGTH, GFP_KERNEL); if (fw_dsp == NULL) return FAIL; } /* step2:load firmware dsp */ pr_debug("step2:load firmware dsp"); Loading Loading @@ -1268,28 +1229,15 @@ static u8 gup_burn_fw_boot(struct i2c_client *client) { s32 ret = 0; u8 *fw_boot = NULL; u8 retry = 0; u8 rd_buf[5]; pr_debug("Begin burn bootloader firmware."); /* step1:Alloc memory */ pr_debug("step1:Alloc memory"); while (retry++ < 5) { fw_boot = devm_kzalloc(&client->dev, FW_BOOT_LENGTH, GFP_KERNEL); if (fw_boot == NULL) { continue; } else { pr_info("Alloc %dk byte memory success.", (FW_BOOT_LENGTH/1024)); break; } } if (retry == 5) { pr_err("Alloc memory fail,exit."); fw_boot = devm_kzalloc(&client->dev, FW_BOOT_LENGTH, GFP_KERNEL); if (fw_boot == NULL) return FAIL; } /* step2:load firmware bootloader */ pr_debug("step2:load firmware bootloader"); Loading