]> git.baikalelectronics.ru Git - kernel.git/commit
tpm: Move tpm_get_random api into the TPM device driver
authorKent Yoder <key@linux.vnet.ibm.com>
Thu, 7 Jun 2012 18:47:14 +0000 (13:47 -0500)
committerKent Yoder <key@linux.vnet.ibm.com>
Wed, 22 Aug 2012 16:11:33 +0000 (11:11 -0500)
commiteefaa1fcba22d5fdda08d2932442609b2f76d919
tree8d53970a210364e19ecbdc05f6d8c8f88e6aadbf
parent9b17a2a0f269503b13ce228f253b6b2517307721
tpm: Move tpm_get_random api into the TPM device driver

Move the tpm_get_random api from the trusted keys code into the TPM
device driver itself so that other callers can make use of it. Also,
change the api slightly so that the number of bytes read is returned in
the call, since the TPM command can potentially return fewer bytes than
requested.

Acked-by: David Safford <safford@linux.vnet.ibm.com>
Reviewed-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
drivers/char/tpm/tpm.c
drivers/char/tpm/tpm.h
include/linux/tpm.h
security/keys/trusted.c