From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sn1nam02on0097.outbound.protection.outlook.com ([104.47.36.97]:15008 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754850AbeDIA2K (ORCPT ); Sun, 8 Apr 2018 20:28:10 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Jason Gunthorpe , Jarkko Sakkinen , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 063/293] tpm_tis: Fix IRQ autoprobing when using platform_device Date: Mon, 9 Apr 2018 00:23:41 +0000 Message-ID: <20180409002239.163177-63-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Jason Gunthorpe [ Upstream commit d27f81f061bbde627ac4fbd735114f9ea2c63615 ] 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=3D1 module parameter") Signed-off-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Tested-by: Jerry Snitselaar (with TPM 2.0) Tested-by: Jarkko Sakkinen (with TPM 1.2) Signed-off-by: Jarkko Sakkinen Signed-off-by: Sasha Levin --- drivers/char/tpm/tpm_tis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 06173d2e316f..2721f9c2e70a 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -334,7 +334,7 @@ static int tpm_tis_plat_probe(struct platform_device *p= dev) if (res) { tpm_info.irq =3D res->start; } else { - if (pdev =3D=3D force_pdev) + if (pdev !=3D force_pdev) tpm_info.irq =3D -1; else /* When forcing auto probe the IRQ */ --=20 2.15.1