tpm/tpm_i2c_stm_st33: Remove useless i2c read on interrupt registers
authorChristophe Ricard <christophe.ricard@gmail.com>
Mon, 1 Dec 2014 18:32:59 +0000 (19:32 +0100)
committerPeter Huewe <peterhuewe@gmx.de>
Sat, 17 Jan 2015 13:00:08 +0000 (14:00 +0100)
Remove useless i2c read on TPM_INT_ENABLE and TPM_INT_STATUS

Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
drivers/char/tpm/tpm_i2c_stm_st33.c

index eb0244a2ec9d0ad253a9532b0991921f65b0b899..1d589e06e0dd8ca831e26332fcc1c3e6949d38e1 100644 (file)
@@ -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);