Commit fc0e1322 authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Jarkko Sakkinen

tpm_tis: Use platform_get_irq

Replace the open coded IORESOURCE_IRQ with platform_get_irq, which
supports more cases.

Fixes: 00194826 ("tpm_tis: Clean up the force=1 module parameter")
Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: default avatarJarkko 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: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent d27f81f0
...@@ -332,10 +332,8 @@ static int tpm_tis_plat_probe(struct platform_device *pdev) ...@@ -332,10 +332,8 @@ static int tpm_tis_plat_probe(struct platform_device *pdev)
} }
tpm_info.res = *res; tpm_info.res = *res;
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); tpm_info.irq = platform_get_irq(pdev, 0);
if (res) { if (tpm_info.irq <= 0) {
tpm_info.irq = res->start;
} else {
if (pdev != force_pdev) if (pdev != force_pdev)
tpm_info.irq = -1; tpm_info.irq = -1;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment