From 19cbe4f680b48f950246815b891a66eeb67f7410 Mon Sep 17 00:00:00 2001 From: Jarkko Sakkinen Date: Wed, 21 Jun 2017 09:31:34 +0200 Subject: tpm: consolidate the TPM startup code Consolidated all the "manual" TPM startup code to a single function in order to make code flows a bit cleaner and migrate to tpm_buf. Tested-by: Stefan Berger Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris --- drivers/char/tpm/tpm.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers/char/tpm/tpm.h') diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index cdd2613..71d661a 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -382,10 +382,6 @@ struct tpm_getrandom_in { __be32 num_bytes; } __packed; -struct tpm_startup_in { - __be16 startup_type; -} __packed; - typedef union { struct tpm_readpubek_params_out readpubek_out; u8 readpubek_out_buffer[sizeof(struct tpm_readpubek_params_out)]; @@ -393,7 +389,6 @@ typedef union { struct tpm_pcrread_out pcrread_out; struct tpm_getrandom_in getrandom_in; struct tpm_getrandom_out getrandom_out; - struct tpm_startup_in startup_in; } tpm_cmd_params; struct tpm_cmd_t { @@ -519,6 +514,7 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_space *space, const void *buf, size_t bufsiz, size_t min_rsp_body_length, unsigned int flags, const char *desc); +int tpm_startup(struct tpm_chip *chip); ssize_t tpm_getcap(struct tpm_chip *chip, u32 subcap_id, cap_t *cap, const char *desc, size_t min_cap_length); int tpm_get_timeouts(struct tpm_chip *); -- cgit v1.1