tpm: add tpm_auto_startup() into tpm-interface.c
[sfrench/cifs-2.6.git] / drivers / char / tpm / tpm-chip.c
index 46caadca916a0a0d3e23b35ca53d3c87142dc97e..32db84683c40160c48c0962ecc63703f62899fd4 100644 (file)
@@ -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);