aboutsummaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorGravatar Mark Hasemeyer <markhas@chromium.org> 2023-03-14 13:54:04 -0600
committerGravatar Jarkko Sakkinen <jarkko@kernel.org> 2023-04-24 16:15:52 +0300
commit96785d635bc2b9e6f819cc606424d342a37872b4 (patch)
treeb124511b6dc17bd8b6c4c27ad5e92dac3255d998 /drivers/char
parentLinux 6.3 (diff)
downloadlinux-96785d635bc2b9e6f819cc606424d342a37872b4.tar.gz
linux-96785d635bc2b9e6f819cc606424d342a37872b4.tar.bz2
linux-96785d635bc2b9e6f819cc606424d342a37872b4.zip
tpm: cr50: i2c: use jiffies to wait for tpm ready irq
When waiting for a tpm ready completion, the cr50 i2c driver incorrectly assumes that the value of timeout_a is represented in milliseconds instead of jiffies. Remove the msecs_to_jiffies conversion. Signed-off-by: Mark Hasemeyer <markhas@chromium.org> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_tis_i2c_cr50.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm_tis_i2c_cr50.c b/drivers/char/tpm/tpm_tis_i2c_cr50.c
index 77cea5b31c6e..376ae18a04eb 100644
--- a/drivers/char/tpm/tpm_tis_i2c_cr50.c
+++ b/drivers/char/tpm/tpm_tis_i2c_cr50.c
@@ -100,8 +100,7 @@ static int tpm_cr50_i2c_wait_tpm_ready(struct tpm_chip *chip)
}
/* Wait for interrupt to indicate TPM is ready to respond */
- if (!wait_for_completion_timeout(&priv->tpm_ready,
- msecs_to_jiffies(chip->timeout_a))) {
+ if (!wait_for_completion_timeout(&priv->tpm_ready, chip->timeout_a)) {
dev_warn(&chip->dev, "Timeout waiting for TPM ready\n");
return -ETIMEDOUT;
}