@@ -187,7 +187,6 @@ static u8 clear_interruption(struct tpm_stm_dev *tpm_dev)
I2C_READ_DATA(tpm_dev, TPM_INT_STATUS, &interrupt, 1);
I2C_WRITE_DATA(tpm_dev, TPM_INT_STATUS, &interrupt, 1);
- I2C_READ_DATA(tpm_dev, TPM_INT_STATUS, &interrupt, 1);
return interrupt;
} /* clear_interruption() */
@@ -753,10 +752,6 @@ tpm_stm_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id)
goto _tpm_clean_answer;
}
- r = I2C_READ_DATA(tpm_dev, TPM_INT_ENABLE, &intmask, 1);
- if (r < 0)
- goto _tpm_clean_answer;
-
intmask |= TPM_INTF_CMD_READY_INT
| TPM_INTF_FIFO_AVALAIBLE_INT
| TPM_INTF_WAKE_UP_READY_INT
@@ -773,10 +768,6 @@ tpm_stm_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id)
if (r < 0)
goto _tpm_clean_answer;
- r = I2C_READ_DATA(tpm_dev, TPM_INT_STATUS, &intmask, 1);
- if (r < 0)
- goto _tpm_clean_answer;
-
chip->vendor.irq = client->irq;
tpm_gen_interrupt(chip);
Remove useless i2c read on TPM_INT_ENABLE and TPM_INT_STATUS Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> --- drivers/char/tpm/tpm_i2c_stm_st33.c | 9 --------- 1 file changed, 9 deletions(-)