From: Jason Gunthorpe Date: Sat, 9 Nov 2013 18:17:00 +0000 (-0700) Subject: tpm: Add missing tpm_do_selftest to ST33 I2C driver X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f07a5e9a331045e976a3d317ba43d14859d9407c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tpm: Add missing tpm_do_selftest to ST33 I2C driver Most device drivers do call 'tpm_do_selftest' which executes a TPM_ContinueSelfTest. tpm_i2c_stm_st33 is just pointlessly different, I think it is bug. These days we have the general assumption that the TPM is usable by the kernel immediately after the driver is finished, so we can no longer defer the mandatory self test to userspace. Cc: # 3.12+ Reported-by: Richard Marciel Signed-off-by: Jason Gunthorpe Signed-off-by: Peter Huewe --- diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c b/drivers/char/tpm/tpm_i2c_stm_st33.c index 3b7bf2162898..4669e3713428 100644 --- a/drivers/char/tpm/tpm_i2c_stm_st33.c +++ b/drivers/char/tpm/tpm_i2c_stm_st33.c @@ -714,6 +714,7 @@ tpm_st33_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) } tpm_get_timeouts(chip); + tpm_do_selftest(chip); dev_info(chip->dev, "TPM I2C Initialized\n"); return 0;