tpm: migrate tpm2_get_random() to use struct tpm_buf
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 26 Mar 2018 12:14:06 +0000 (15:14 +0300)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sat, 28 Jul 2018 14:03:11 +0000 (17:03 +0300)
commitce63c05b664e491b4cc79c713c68d8170bd0f581
tree077b94156127e47016990cee8186e85591f41b77
parent2ab3241161b3c340617063beea199e9966ee90c9
tpm: migrate tpm2_get_random() to use struct tpm_buf

In order to make struct tpm_buf the first class object for constructing
TPM commands, migrate tpm2_get_random() to use it. In addition, removed
remaining references to struct tpm2_cmd. All of them use it to acquire
the length of the response, which can be achieved by using
tpm_buf_length().

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Nayna Jain<nayna@linux.vnet.ibm.com>
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm2-cmd.c