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>
This commit is contained in:
Mark Hasemeyer 2023-03-14 13:54:04 -06:00 коммит произвёл Jarkko Sakkinen
Родитель 457391b038
Коммит 96785d635b
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -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;
}