Skip to content

Commit

Permalink
tpm/tpm_i2c_stm_st33: Remove useless i2c read on interrupt registers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe Ricard authored and Peter Huewe committed Jan 17, 2015
1 parent c3804b8 commit 00820e8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/char/tpm/tpm_i2c_stm_st33.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 00820e8

Please sign in to comment.