aboutsummaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorJason Gunthorpe2017-05-04 09:53:23 -0600
committerJarkko Sakkinen2017-06-13 22:02:08 +0300
commitd27f81f061bbde627ac4fbd735114f9ea2c63615 (patch)
tree8b3e9e24ffc4106dcb13058f64ec3369d94d063c /drivers/char
parent175d5b2a570cc0f79a23dbaf86e35e660f6f544f (diff)
tpm_tis: Fix IRQ autoprobing when using platform_device
The test was backwards, triggering IRQ autoprobing if the firmware did not specify an IRQ, instead of triggering it only when the module force parameter was specified. Since autoprobing is not enabled on !x86 and the platform device is currently only used on !x86, or with force, this has gone unnoticed. Fixes: 00194826e6be ("tpm_tis: Clean up the force=1 module parameter") Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Jerry Snitselaar <jsnitsel@redhat.com> (with TPM 2.0) Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> (with TPM 1.2) Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_tis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index c7e1384f1b08..56ce2bb19166 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -336,7 +336,7 @@ static int tpm_tis_plat_probe(struct platform_device *pdev)
if (res) {
tpm_info.irq = res->start;
} else {
- if (pdev == force_pdev)
+ if (pdev != force_pdev)
tpm_info.irq = -1;
else
/* When forcing auto probe the IRQ */