diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2016-03-23 03:55:34 -0400 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2016-06-25 10:26:35 -0400 |
commit | ddab0e34288a233ffd8763aa7c938d61ab128c0b (patch) | |
tree | b379e10211618cfcb67938576aaa52bb2fbeacc1 /drivers/char/tpm | |
parent | 20ab99f89d574ba3c3944a6682bec5a6e0c0dcd9 (diff) |
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>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r-- | drivers/char/tpm/st33zp24/st33zp24.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/tpm/st33zp24/st33zp24.c b/drivers/char/tpm/st33zp24/st33zp24.c index 944d279f2402..9e91ca74e1dd 100644 --- a/drivers/char/tpm/st33zp24/st33zp24.c +++ b/drivers/char/tpm/st33zp24/st33zp24.c | |||
@@ -208,21 +208,21 @@ static int get_burstcount(struct tpm_chip *chip) | |||
208 | { | 208 | { |
209 | unsigned long stop; | 209 | unsigned long stop; |
210 | int burstcnt, status; | 210 | int burstcnt, status; |
211 | u8 tpm_reg, temp; | 211 | u8 temp; |
212 | struct st33zp24_dev *tpm_dev; | 212 | struct st33zp24_dev *tpm_dev; |
213 | 213 | ||
214 | tpm_dev = (struct st33zp24_dev *)TPM_VPRIV(chip); | 214 | tpm_dev = (struct st33zp24_dev *)TPM_VPRIV(chip); |
215 | 215 | ||
216 | stop = jiffies + chip->vendor.timeout_d; | 216 | stop = jiffies + chip->vendor.timeout_d; |
217 | do { | 217 | do { |
218 | tpm_reg = TPM_STS + 1; | 218 | status = tpm_dev->ops->recv(tpm_dev->phy_id, TPM_STS + 1, |
219 | status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1); | 219 | &temp, 1); |
220 | if (status < 0) | 220 | if (status < 0) |
221 | return -EBUSY; | 221 | return -EBUSY; |
222 | 222 | ||
223 | tpm_reg = TPM_STS + 2; | ||
224 | burstcnt = temp; | 223 | 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); | ||
226 | if (status < 0) | 226 | if (status < 0) |
227 | return -EBUSY; | 227 | return -EBUSY; |
228 | 228 | ||