summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorJarkko Sakkinen2016-06-17 10:20:14 +0200
committerJarkko Sakkinen2016-09-15 15:04:21 +0200
commitae7e190a3e3498551a1e222eaa84c0ec7e5b41c7 (patch)
tree0012be65a98b0187d142bd1c81958c33c5b347c2 /drivers/char/tpm
parenttpm: replace tpm_gen_interrupt() with tpm_tis_gen_interrupt() (diff)
downloadkernel-qcow2-linux-ae7e190a3e3498551a1e222eaa84c0ec7e5b41c7.tar.gz
kernel-qcow2-linux-ae7e190a3e3498551a1e222eaa84c0ec7e5b41c7.tar.xz
kernel-qcow2-linux-ae7e190a3e3498551a1e222eaa84c0ec7e5b41c7.zip
tpm: use tpm_transmit_cmd() in tpm2_probe()
It is better to tpm_transmit_cmd() in tpm2_probe() in order to get consistent command handling throughout the subsystem. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r--drivers/char/tpm/tpm2-cmd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index a5aa8de23c3d..7df55d58c939 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -941,11 +941,9 @@ int tpm2_probe(struct tpm_chip *chip)
cmd.params.get_tpm_pt_in.property_id = cpu_to_be32(0x100);
cmd.params.get_tpm_pt_in.property_cnt = cpu_to_be32(1);
- rc = tpm_transmit(chip, (const u8 *)&cmd, sizeof(cmd), 0);
+ rc = tpm_transmit_cmd(chip, &cmd, sizeof(cmd), 0, NULL);
if (rc < 0)
return rc;
- else if (rc < TPM_HEADER_SIZE)
- return -EFAULT;
if (be16_to_cpu(cmd.header.out.tag) == TPM2_ST_NO_SESSIONS)
chip->flags |= TPM_CHIP_FLAG_TPM2;