1
0

tpm: add tpm_auto_startup() into tpm-interface.c

Add wrapper tpm_auto_startup() to tpm-interface.c
instead of open coded decision between TPM 1.x and TPM 2.x
in tpm-chip.c

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Este cometimento está contido em:
Tomas Winkler
2018-10-19 21:22:59 +03:00
cometido por Jarkko Sakkinen
ascendente 9db7fe187c
cometimento b03c43702e
3 ficheiros modificados com 19 adições e 8 eliminações

Ver ficheiro

@@ -451,14 +451,9 @@ int tpm_chip_register(struct tpm_chip *chip)
{
int rc;
if (chip->ops->flags & TPM_OPS_AUTO_STARTUP) {
if (chip->flags & TPM_CHIP_FLAG_TPM2)
rc = tpm2_auto_startup(chip);
else
rc = tpm1_auto_startup(chip);
if (rc)
return rc;
}
rc = tpm_auto_startup(chip);
if (rc)
return rc;
tpm_sysfs_add_device(chip);