Skip to content

Commit cfddcb0

Browse files
Tomas WinklerJarkko Sakkinen
authored andcommitted
tpm1: rename tpm1_pcr_read_dev to tpm1_pcr_read()
Rename tpm1_pcr_read_dev to tpm1_pcr_read() to match the counterpart tpm2_pcr_read(). Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
1 parent 5e335b5 commit cfddcb0

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎drivers/char/tpm/tpm-interface.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ int tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf)
465465
if (chip->flags & TPM_CHIP_FLAG_TPM2)
466466
rc = tpm2_pcr_read(chip, pcr_idx, res_buf);
467467
else
468-
rc = tpm1_pcr_read_dev(chip, pcr_idx, res_buf);
468+
rc = tpm1_pcr_read(chip, pcr_idx, res_buf);
469469

470470
tpm_put_ops(chip);
471471
return rc;

‎drivers/char/tpm/tpm-sysfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static ssize_t pcrs_show(struct device *dev, struct device_attribute *attr,
114114

115115
num_pcrs = be32_to_cpu(cap.num_pcrs);
116116
for (i = 0; i < num_pcrs; i++) {
117-
rc = tpm1_pcr_read_dev(chip, i, digest);
117+
rc = tpm1_pcr_read(chip, i, digest);
118118
if (rc)
119119
break;
120120
str += sprintf(str, "PCR-%02d: ", i);

‎drivers/char/tpm/tpm.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ int tpm1_get_timeouts(struct tpm_chip *chip);
525525
unsigned long tpm1_calc_ordinal_duration(struct tpm_chip *chip, u32 ordinal);
526526
int tpm1_pcr_extend(struct tpm_chip *chip, int pcr_idx, const u8 *hash,
527527
const char *log_msg);
528-
int tpm1_pcr_read_dev(struct tpm_chip *chip, int pcr_idx, u8 *res_buf);
528+
int tpm1_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf);
529529
ssize_t tpm1_getcap(struct tpm_chip *chip, u32 subcap_id, cap_t *cap,
530530
const char *desc, size_t min_cap_length);
531531
int tpm1_get_random(struct tpm_chip *chip, u8 *out, size_t max);

‎drivers/char/tpm/tpm1-cmd.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ int tpm1_get_random(struct tpm_chip *chip, u8 *dest, size_t max)
572572
}
573573

574574
#define TPM_ORD_PCRREAD 21
575-
int tpm1_pcr_read_dev(struct tpm_chip *chip, int pcr_idx, u8 *res_buf)
575+
int tpm1_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf)
576576
{
577577
struct tpm_buf buf;
578578
int rc;
@@ -660,7 +660,7 @@ int tpm1_do_selftest(struct tpm_chip *chip)
660660

661661
do {
662662
/* Attempt to read a PCR value */
663-
rc = tpm1_pcr_read_dev(chip, 0, dummy);
663+
rc = tpm1_pcr_read(chip, 0, dummy);
664664

665665
/* Some buggy TPMs will not respond to tpm_tis_ready() for
666666
* around 300ms while the self test is ongoing, keep trying

0 commit comments

Comments
 (0)