aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r--drivers/char/tpm/tpm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index 1fee7034a386..6b5a0e0127a7 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -525,19 +525,19 @@ void tpm_get_timeouts(struct tpm_chip *chip)
525 timeout = 525 timeout =
526 be32_to_cpu(*((__be32 *) (data + TPM_GET_CAP_RET_UINT32_1_IDX))); 526 be32_to_cpu(*((__be32 *) (data + TPM_GET_CAP_RET_UINT32_1_IDX)));
527 if (timeout) 527 if (timeout)
528 chip->vendor.timeout_a = msecs_to_jiffies(timeout); 528 chip->vendor.timeout_a = usecs_to_jiffies(timeout);
529 timeout = 529 timeout =
530 be32_to_cpu(*((__be32 *) (data + TPM_GET_CAP_RET_UINT32_2_IDX))); 530 be32_to_cpu(*((__be32 *) (data + TPM_GET_CAP_RET_UINT32_2_IDX)));
531 if (timeout) 531 if (timeout)
532 chip->vendor.timeout_b = msecs_to_jiffies(timeout); 532 chip->vendor.timeout_b = usecs_to_jiffies(timeout);
533 timeout = 533 timeout =
534 be32_to_cpu(*((__be32 *) (data + TPM_GET_CAP_RET_UINT32_3_IDX))); 534 be32_to_cpu(*((__be32 *) (data + TPM_GET_CAP_RET_UINT32_3_IDX)));
535 if (timeout) 535 if (timeout)
536 chip->vendor.timeout_c = msecs_to_jiffies(timeout); 536 chip->vendor.timeout_c = usecs_to_jiffies(timeout);
537 timeout = 537 timeout =
538 be32_to_cpu(*((__be32 *) (data + TPM_GET_CAP_RET_UINT32_4_IDX))); 538 be32_to_cpu(*((__be32 *) (data + TPM_GET_CAP_RET_UINT32_4_IDX)));
539 if (timeout) 539 if (timeout)
540 chip->vendor.timeout_d = msecs_to_jiffies(timeout); 540 chip->vendor.timeout_d = usecs_to_jiffies(timeout);
541 541
542duration: 542duration:
543 memcpy(data, tpm_cap, sizeof(tpm_cap)); 543 memcpy(data, tpm_cap, sizeof(tpm_cap));
@@ -554,15 +554,15 @@ duration:
554 return; 554 return;
555 555
556 chip->vendor.duration[TPM_SHORT] = 556 chip->vendor.duration[TPM_SHORT] =
557 msecs_to_jiffies(be32_to_cpu 557 usecs_to_jiffies(be32_to_cpu
558 (*((__be32 *) (data + 558 (*((__be32 *) (data +
559 TPM_GET_CAP_RET_UINT32_1_IDX)))); 559 TPM_GET_CAP_RET_UINT32_1_IDX))));
560 chip->vendor.duration[TPM_MEDIUM] = 560 chip->vendor.duration[TPM_MEDIUM] =
561 msecs_to_jiffies(be32_to_cpu 561 usecs_to_jiffies(be32_to_cpu
562 (*((__be32 *) (data + 562 (*((__be32 *) (data +
563 TPM_GET_CAP_RET_UINT32_2_IDX)))); 563 TPM_GET_CAP_RET_UINT32_2_IDX))));
564 chip->vendor.duration[TPM_LONG] = 564 chip->vendor.duration[TPM_LONG] =
565 msecs_to_jiffies(be32_to_cpu 565 usecs_to_jiffies(be32_to_cpu
566 (*((__be32 *) (data + 566 (*((__be32 *) (data +
567 TPM_GET_CAP_RET_UINT32_3_IDX)))); 567 TPM_GET_CAP_RET_UINT32_3_IDX))));
568} 568}