KEYS: trusted: explicitly use tpm_chip structure from tpm_default_chip()
authorRoberto Sassu <roberto.sassu@huawei.com>
Wed, 6 Feb 2019 16:24:51 +0000 (17:24 +0100)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Fri, 8 Feb 2019 00:27:58 +0000 (02:27 +0200)
commitf84fff0fecf2e0d9923dea6e266ac5928c2b4b75
tree79e150b673b6741dca98edebbcfbab5b19739ed5
parent1cced802c72c86bdeea799ae9b8df06af061e3fb
KEYS: trusted: explicitly use tpm_chip structure from tpm_default_chip()

When crypto agility support will be added to the TPM driver, users of the
driver have to retrieve the allocated banks from chip->allocated_banks and
use this information to prepare the array of tpm_digest structures to be
passed to tpm_pcr_extend().

This patch retrieves a tpm_chip pointer from tpm_default_chip() so that the
pointer can be used to prepare the array of tpm_digest structures.

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.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>
security/keys/trusted.c