aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/tpm/tpm_i2c_nuvoton.c
diff options
context:
space:
mode:
authorTomas Winkler2018-10-19 21:22:50 +0300
committerJarkko Sakkinen2018-11-13 13:46:29 +0200
commitb2d6e6de005edf5f2f46b7abacb69a0a1ce75c23 (patch)
treef75a72219c7bc258641207083291bf155266d823 /drivers/char/tpm/tpm_i2c_nuvoton.c
parent100b16a6f2906624764b75684922bcdc67404847 (diff)
tpm: factor out tpm 1.x duration calculation to tpm1-cmd.c
Factor out TPM 1.x commands calculation into tpm1-cmd.c file. and change the prefix from tpm_ to tpm1_. No functional change is done here. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.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/tpm_i2c_nuvoton.c')
-rw-r--r--drivers/char/tpm/tpm_i2c_nuvoton.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c b/drivers/char/tpm/tpm_i2c_nuvoton.c
index f74f451baf6a..ad76482ee387 100644
--- a/drivers/char/tpm/tpm_i2c_nuvoton.c
+++ b/drivers/char/tpm/tpm_i2c_nuvoton.c
@@ -459,11 +459,12 @@ static int i2c_nuvoton_send(struct tpm_chip *chip, u8 *buf, size_t len)
if (chip->flags & TPM_CHIP_FLAG_TPM2)
duration = tpm2_calc_ordinal_duration(chip, ordinal);
else
- duration = tpm_calc_ordinal_duration(chip, ordinal);
+ duration = tpm1_calc_ordinal_duration(chip, ordinal);
rc = i2c_nuvoton_wait_for_data_avail(chip, duration, &priv->read_queue);
if (rc) {
- dev_err(dev, "%s() timeout command duration\n", __func__);
+ dev_err(dev, "%s() timeout command duration %ld\n",
+ __func__, duration);
i2c_nuvoton_ready(chip);
return rc;
}