提交 ddab0e34 编写于 作者: C Christophe Ricard 提交者: Jarkko Sakkinen

tpm/st33zp24: Remove unneeded tpm_reg in get_burstcount

We can get rid of tpm_reg variable in get_burstcount.
Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
上级 20ab99f8
...@@ -208,21 +208,21 @@ static int get_burstcount(struct tpm_chip *chip) ...@@ -208,21 +208,21 @@ static int get_burstcount(struct tpm_chip *chip)
{ {
unsigned long stop; unsigned long stop;
int burstcnt, status; int burstcnt, status;
u8 tpm_reg, temp; u8 temp;
struct st33zp24_dev *tpm_dev; struct st33zp24_dev *tpm_dev;
tpm_dev = (struct st33zp24_dev *)TPM_VPRIV(chip); tpm_dev = (struct st33zp24_dev *)TPM_VPRIV(chip);
stop = jiffies + chip->vendor.timeout_d; stop = jiffies + chip->vendor.timeout_d;
do { do {
tpm_reg = TPM_STS + 1; status = tpm_dev->ops->recv(tpm_dev->phy_id, TPM_STS + 1,
status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1); &temp, 1);
if (status < 0) if (status < 0)
return -EBUSY; return -EBUSY;
tpm_reg = TPM_STS + 2;
burstcnt = temp; burstcnt = temp;
status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1); status = tpm_dev->ops->recv(tpm_dev->phy_id, TPM_STS + 2,
&temp, 1);
if (status < 0) if (status < 0)
return -EBUSY; return -EBUSY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册