aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm1-cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tpm/tpm1-cmd.c')
-rw-r--r--drivers/char/tpm/tpm1-cmd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/tpm/tpm1-cmd.c b/drivers/char/tpm/tpm1-cmd.c
index 5b5f8bcc6210..ec5f3693c096 100644
--- a/drivers/char/tpm/tpm1-cmd.c
+++ b/drivers/char/tpm/tpm1-cmd.c
@@ -334,7 +334,7 @@ static int tpm1_startup(struct tpm_chip *chip)
334 334
335 tpm_buf_append_u16(&buf, TPM_ST_CLEAR); 335 tpm_buf_append_u16(&buf, TPM_ST_CLEAR);
336 336
337 rc = tpm_transmit_cmd(chip, &buf, 0, 0, "attempting to start the TPM"); 337 rc = tpm_transmit_cmd(chip, &buf, 0, "attempting to start the TPM");
338 tpm_buf_destroy(&buf); 338 tpm_buf_destroy(&buf);
339 return rc; 339 return rc;
340} 340}
@@ -458,7 +458,7 @@ int tpm1_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, const u8 *hash,
458 tpm_buf_append_u32(&buf, pcr_idx); 458 tpm_buf_append_u32(&buf, pcr_idx);
459 tpm_buf_append(&buf, hash, TPM_DIGEST_SIZE); 459 tpm_buf_append(&buf, hash, TPM_DIGEST_SIZE);
460 460
461 rc = tpm_transmit_cmd(chip, &buf, TPM_DIGEST_SIZE, 0, log_msg); 461 rc = tpm_transmit_cmd(chip, &buf, TPM_DIGEST_SIZE, log_msg);
462 tpm_buf_destroy(&buf); 462 tpm_buf_destroy(&buf);
463 return rc; 463 return rc;
464} 464}
@@ -488,7 +488,7 @@ ssize_t tpm1_getcap(struct tpm_chip *chip, u32 subcap_id, cap_t *cap,
488 tpm_buf_append_u32(&buf, 4); 488 tpm_buf_append_u32(&buf, 4);
489 tpm_buf_append_u32(&buf, subcap_id); 489 tpm_buf_append_u32(&buf, subcap_id);
490 } 490 }
491 rc = tpm_transmit_cmd(chip, &buf, min_cap_length, 0, desc); 491 rc = tpm_transmit_cmd(chip, &buf, min_cap_length, desc);
492 if (!rc) 492 if (!rc)
493 *cap = *(cap_t *)&buf.data[TPM_HEADER_SIZE + 4]; 493 *cap = *(cap_t *)&buf.data[TPM_HEADER_SIZE + 4];
494 tpm_buf_destroy(&buf); 494 tpm_buf_destroy(&buf);
@@ -529,7 +529,7 @@ int tpm1_get_random(struct tpm_chip *chip, u8 *dest, size_t max)
529 do { 529 do {
530 tpm_buf_append_u32(&buf, num_bytes); 530 tpm_buf_append_u32(&buf, num_bytes);
531 531
532 rc = tpm_transmit_cmd(chip, &buf, sizeof(out->rng_data_len), 0, 532 rc = tpm_transmit_cmd(chip, &buf, sizeof(out->rng_data_len),
533 "attempting get random"); 533 "attempting get random");
534 if (rc) 534 if (rc)
535 goto out; 535 goto out;
@@ -574,7 +574,7 @@ int tpm1_pcr_read(struct tpm_chip *chip, u32 pcr_idx, u8 *res_buf)
574 574
575 tpm_buf_append_u32(&buf, pcr_idx); 575 tpm_buf_append_u32(&buf, pcr_idx);
576 576
577 rc = tpm_transmit_cmd(chip, &buf, TPM_DIGEST_SIZE, 0, 577 rc = tpm_transmit_cmd(chip, &buf, TPM_DIGEST_SIZE,
578 "attempting to read a pcr value"); 578 "attempting to read a pcr value");
579 if (rc) 579 if (rc)
580 goto out; 580 goto out;
@@ -608,7 +608,7 @@ static int tpm1_continue_selftest(struct tpm_chip *chip)
608 if (rc) 608 if (rc)
609 return rc; 609 return rc;
610 610
611 rc = tpm_transmit_cmd(chip, &buf, 0, 0, "continue selftest"); 611 rc = tpm_transmit_cmd(chip, &buf, 0, "continue selftest");
612 tpm_buf_destroy(&buf); 612 tpm_buf_destroy(&buf);
613 return rc; 613 return rc;
614} 614}
@@ -734,7 +734,7 @@ int tpm1_pm_suspend(struct tpm_chip *chip, u32 tpm_suspend_pcr)
734 return rc; 734 return rc;
735 /* now do the actual savestate */ 735 /* now do the actual savestate */
736 for (try = 0; try < TPM_RETRY; try++) { 736 for (try = 0; try < TPM_RETRY; try++) {
737 rc = tpm_transmit_cmd(chip, &buf, 0, 0, NULL); 737 rc = tpm_transmit_cmd(chip, &buf, 0, NULL);
738 /* 738 /*
739 * If the TPM indicates that it is too busy to respond to 739 * If the TPM indicates that it is too busy to respond to
740 * this command then retry before giving up. It can take 740 * this command then retry before giving up. It can take