From: Christophe Ricard Date: Mon, 1 Dec 2014 18:32:59 +0000 (+0100) Subject: tpm/tpm_i2c_stm_st33: Remove useless i2c read on interrupt registers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=00820e8207b9b87fe0e34062876696dd6d326b2d;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git tpm/tpm_i2c_stm_st33: Remove useless i2c read on interrupt registers Remove useless i2c read on TPM_INT_ENABLE and TPM_INT_STATUS Reviewed-by: Jason Gunthorpe Signed-off-by: Christophe Ricard Signed-off-by: Peter Huewe --- diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c b/drivers/char/tpm/tpm_i2c_stm_st33.c index eb0244a2ec9d..1d589e06e0dd 100644 --- a/drivers/char/tpm/tpm_i2c_stm_st33.c +++ b/drivers/char/tpm/tpm_i2c_stm_st33.c @@ -783,10 +783,6 @@ tpm_stm_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) goto _tpm_clean_answer; } - ret = I2C_READ_DATA(tpm_dev, TPM_INT_ENABLE, &intmask, 1); - if (ret < 0) - goto _tpm_clean_answer; - intmask |= TPM_INTF_CMD_READY_INT | TPM_INTF_STS_VALID_INT | TPM_INTF_DATA_AVAIL_INT; @@ -801,10 +797,6 @@ tpm_stm_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) if (ret < 0) goto _tpm_clean_answer; - ret = I2C_READ_DATA(tpm_dev, TPM_INT_STATUS, &intmask, 1); - if (ret < 0) - goto _tpm_clean_answer; - chip->vendor.irq = client->irq; disable_irq_nosync(chip->vendor.irq);