Message ID | 1458719734-13752-4-git-send-email-christophe-h.ricard@st.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Mar 23, 2016 at 08:55:34AM +0100, Christophe Ricard wrote: > 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> /Jarkko > --- > drivers/char/tpm/st33zp24/st33zp24.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/char/tpm/st33zp24/st33zp24.c b/drivers/char/tpm/st33zp24/st33zp24.c > index 944d279..9e91ca7 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) > { > unsigned long stop; > int burstcnt, status; > - u8 tpm_reg, temp; > + u8 temp; > struct st33zp24_dev *tpm_dev; > > tpm_dev = (struct st33zp24_dev *)TPM_VPRIV(chip); > > stop = jiffies + chip->vendor.timeout_d; > do { > - tpm_reg = TPM_STS + 1; > - status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1); > + status = tpm_dev->ops->recv(tpm_dev->phy_id, TPM_STS + 1, > + &temp, 1); > if (status < 0) > return -EBUSY; > > - tpm_reg = TPM_STS + 2; > 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) > return -EBUSY; > > -- > 2.5.0 > ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
diff --git a/drivers/char/tpm/st33zp24/st33zp24.c b/drivers/char/tpm/st33zp24/st33zp24.c index 944d279..9e91ca7 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) { unsigned long stop; int burstcnt, status; - u8 tpm_reg, temp; + u8 temp; struct st33zp24_dev *tpm_dev; tpm_dev = (struct st33zp24_dev *)TPM_VPRIV(chip); stop = jiffies + chip->vendor.timeout_d; do { - tpm_reg = TPM_STS + 1; - status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1); + status = tpm_dev->ops->recv(tpm_dev->phy_id, TPM_STS + 1, + &temp, 1); if (status < 0) return -EBUSY; - tpm_reg = TPM_STS + 2; 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) return -EBUSY;
We can get rid of tpm_reg variable in get_burstcount. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> --- drivers/char/tpm/st33zp24/st33zp24.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)