aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/tpm/tpm-sysfs.c
diff options
context:
space:
mode:
authorGravatar Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> 2018-10-26 14:34:22 +0100
committerGravatar Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> 2019-02-13 09:47:01 +0200
commit412eb585587a1dc43c9622db79de9663b6c4c238 (patch)
tree78371b2387e6621ea6bfb4ccaeda9266fb5dbf6e /drivers/char/tpm/tpm-sysfs.c
parenttpm: don't return bool from update_timeouts (diff)
downloadlinux-412eb585587a1dc43c9622db79de9663b6c4c238.tar.gz
linux-412eb585587a1dc43c9622db79de9663b6c4c238.tar.bz2
linux-412eb585587a1dc43c9622db79de9663b6c4c238.zip
tpm: use tpm_buf in tpm_transmit_cmd() as the IO parameter
Since we pass an initialized struct tpm_buf instance in every call site now, it is cleaner to pass that directly to the tpm_transmit_cmd() as the TPM command/response buffer. Fine-tune a little bit tpm_transmit() and tpm_transmit_cmd() comments while doing this. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Tested-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Reviewed-by: James Bottomley <James.Bottomley@HansenPartnership.com> Tested-by: Alexander Steffen <Alexander.Steffen@infineon.com>
Diffstat (limited to 'drivers/char/tpm/tpm-sysfs.c')
-rw-r--r--drivers/char/tpm/tpm-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm-sysfs.c b/drivers/char/tpm/tpm-sysfs.c
index b88e08ec2c59..c2769e55cb6c 100644
--- a/drivers/char/tpm/tpm-sysfs.c
+++ b/drivers/char/tpm/tpm-sysfs.c
@@ -53,7 +53,7 @@ static ssize_t pubek_show(struct device *dev, struct device_attribute *attr,
tpm_buf_append(&tpm_buf, anti_replay, sizeof(anti_replay));
- rc = tpm_transmit_cmd(chip, NULL, tpm_buf.data, PAGE_SIZE,
+ rc = tpm_transmit_cmd(chip, NULL, &tpm_buf,
READ_PUBEK_RESULT_MIN_BODY_SIZE, 0,
"attempting to read the PUBEK");
if (rc) {