diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2018-10-19 21:23:02 +0300 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2018-11-13 14:46:31 +0300 |
commit | 7aee9c52d7ac90e19705bf3b429caa51f105174a (patch) | |
tree | e633bee34e1452e8cd5705b45bcaaa2a0118ec37 /drivers/char/tpm/tpm-interface.c | |
parent | c22780ff0c764ca25488a41b1f8a629e6aa545da (diff) | |
download | linux-7aee9c52d7ac90e19705bf3b429caa51f105174a.tar.xz |
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-interface.c')
-rw-r--r-- | drivers/char/tpm/tpm-interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index e6ece49e18a8..a6c5d40e30b0 100644 --- a/drivers/char/tpm/tpm-interface.c +++ b/drivers/char/tpm/tpm-interface.c @@ -600,7 +600,7 @@ EXPORT_SYMBOL_GPL(tpm_pm_resume); * @out: destination buffer for the random bytes * @max: the max number of bytes to write to @out * - * Return: same as with tpm_transmit_cmd() + * Return: number of random bytes read or a negative error value. */ int tpm_get_random(struct tpm_chip *chip, u8 *out, size_t max) { |