Skip to content

Commit 0c61500

Browse files
cricard13Jarkko Sakkinen
authored andcommitted
tpm/st33zp24: Remove unneeded tpm_reg in get_burstcount
We can get rid of tpm_reg variable in get_burstcount. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
1 parent d2333d1 commit 0c61500

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/char/tpm/st33zp24/st33zp24.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,21 +208,21 @@ static int get_burstcount(struct tpm_chip *chip)
208208
{
209209
unsigned long stop;
210210
int burstcnt, status;
211-
u8 tpm_reg, temp;
211+
u8 temp;
212212
struct st33zp24_dev *tpm_dev;
213213

214214
tpm_dev = (struct st33zp24_dev *)TPM_VPRIV(chip);
215215

216216
stop = jiffies + chip->vendor.timeout_d;
217217
do {
218-
tpm_reg = TPM_STS + 1;
219-
status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1);
218+
status = tpm_dev->ops->recv(tpm_dev->phy_id, TPM_STS + 1,
219+
&temp, 1);
220220
if (status < 0)
221221
return -EBUSY;
222222

223-
tpm_reg = TPM_STS + 2;
224223
burstcnt = temp;
225-
status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1);
224+
status = tpm_dev->ops->recv(tpm_dev->phy_id, TPM_STS + 2,
225+
&temp, 1);
226226
if (status < 0)
227227
return -EBUSY;
228228

0 commit comments

Comments
 (0)