mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
arm64/dts: surf ft tp update
surfNA: focaltech tp driver update fix NULL pointer crash issue Change-Id: I7154ae202f09fc622a88e28411841db8c211102a Signed-off-by: hujing3 <hujing3@lenovo.com> Reviewed-on: https://gerrit.mot.com/1281380 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
53d25de060
commit
e250309ddc
1 changed files with 14 additions and 6 deletions
|
|
@ -1158,23 +1158,31 @@ static int ft_power_init(struct ft_ts_data *data, bool on)
|
|||
|
||||
reg_vcc_i2c_put:
|
||||
regulator_put(data->vcc_i2c);
|
||||
data->vcc_i2c = NULL;
|
||||
reg_vdd_set_vtg:
|
||||
if (regulator_count_voltages(data->vdd) > 0)
|
||||
regulator_set_voltage(data->vdd, 0, FT_VTG_MAX_UV);
|
||||
reg_vdd_put:
|
||||
regulator_put(data->vdd);
|
||||
data->vdd = NULL;
|
||||
|
||||
return rc;
|
||||
|
||||
pwr_deinit:
|
||||
if (regulator_count_voltages(data->vdd) > 0)
|
||||
regulator_set_voltage(data->vdd, 0, FT_VTG_MAX_UV);
|
||||
if (!IS_ERR_OR_NULL(data->vdd)) {
|
||||
if (regulator_count_voltages(data->vdd) > 0)
|
||||
regulator_set_voltage(data->vdd, 0, FT_VTG_MAX_UV);
|
||||
|
||||
regulator_put(data->vdd);
|
||||
regulator_put(data->vdd);
|
||||
}
|
||||
|
||||
if (regulator_count_voltages(data->vcc_i2c) > 0)
|
||||
regulator_set_voltage(data->vcc_i2c, 0, FT_I2C_VTG_MAX_UV);
|
||||
if (!IS_ERR_OR_NULL(data->vcc_i2c)) {
|
||||
if (regulator_count_voltages(data->vcc_i2c) > 0)
|
||||
regulator_set_voltage(data->vcc_i2c, 0, FT_I2C_VTG_MAX_UV);
|
||||
|
||||
regulator_put(data->vcc_i2c);
|
||||
}
|
||||
|
||||
regulator_put(data->vcc_i2c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue