summary refs log tree commit diff
path: root/drivers/char/tpm/tpm.h
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2018-10-19 21:23:02 +0300
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2018-11-13 13:46:31 +0200
commit7aee9c52d7ac90e19705bf3b429caa51f105174a (patch)
treee633bee34e1452e8cd5705b45bcaaa2a0118ec37 /drivers/char/tpm/tpm.h
parentc22780ff0c764ca25488a41b1f8a629e6aa545da (diff)
downloadlinux-7aee9c52d7ac90e19705bf3b429caa51f105174a.tar.gz
tpm: tpm1: rewrite tpm1_get_random() using tpm_buf structure
1. Use tpm_buf in tpm1_get_random()
2. Fix comment in tpm_get_random() so it is clear that
the function is expected to return number of random bytes.

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>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r--drivers/char/tpm/tpm.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index daca1d0190b1..6895f183396b 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -396,20 +396,9 @@ struct tpm_pcrread_in {
  * compiler warnings about stack frame size. */
 #define TPM_MAX_RNG_DATA	128
 
-struct tpm_getrandom_out {
-	__be32 rng_data_len;
-	u8     rng_data[TPM_MAX_RNG_DATA];
-} __packed;
-
-struct tpm_getrandom_in {
-	__be32 num_bytes;
-} __packed;
-
 typedef union {
 	struct	tpm_pcrread_in	pcrread_in;
 	struct	tpm_pcrread_out	pcrread_out;
-	struct	tpm_getrandom_in getrandom_in;
-	struct	tpm_getrandom_out getrandom_out;
 } tpm_cmd_params;
 
 struct tpm_cmd_t {