tpm: Factor out common startup code
[cascardo/linux.git] / drivers / char / tpm / st33zp24 / st33zp24.c
index a7c99a2..c2ee304 100644 (file)
@@ -505,6 +505,7 @@ static bool st33zp24_req_canceled(struct tpm_chip *chip, u8 status)
 }
 
 static const struct tpm_class_ops st33zp24_tpm = {
+       .flags = TPM_OPS_AUTO_STARTUP,
        .send = st33zp24_send,
        .recv = st33zp24_recv,
        .cancel = st33zp24_cancel,
@@ -592,9 +593,6 @@ int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
                tpm_gen_interrupt(chip);
        }
 
-       tpm_get_timeouts(chip);
-       tpm_do_selftest(chip);
-
        return tpm_chip_register(chip);
 _tpm_clean_answer:
        dev_info(&chip->dev, "TPM initialization fail\n");