|
@@ -777,20 +777,20 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
|
|
if (intfcaps & TPM_INTF_DATA_AVAIL_INT)
|
|
|
dev_dbg(dev, "\tData Avail Int Support\n");
|
|
|
|
|
|
- /* Very early on issue a command to the TPM in polling mode to make
|
|
|
- * sure it works. May as well use that command to set the proper
|
|
|
- * timeouts for the driver.
|
|
|
- */
|
|
|
- if (tpm_get_timeouts(chip)) {
|
|
|
- dev_err(dev, "Could not get TPM timeouts and durations\n");
|
|
|
- rc = -ENODEV;
|
|
|
- goto out_err;
|
|
|
- }
|
|
|
-
|
|
|
/* INTERRUPT Setup */
|
|
|
init_waitqueue_head(&priv->read_queue);
|
|
|
init_waitqueue_head(&priv->int_queue);
|
|
|
if (irq != -1) {
|
|
|
+ /* Before doing irq testing issue a command to the TPM in polling mode
|
|
|
+ * to make sure it works. May as well use that command to set the
|
|
|
+ * proper timeouts for the driver.
|
|
|
+ */
|
|
|
+ if (tpm_get_timeouts(chip)) {
|
|
|
+ dev_err(dev, "Could not get TPM timeouts and durations\n");
|
|
|
+ rc = -ENODEV;
|
|
|
+ goto out_err;
|
|
|
+ }
|
|
|
+
|
|
|
if (irq) {
|
|
|
tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
|
|
|
irq);
|