aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorPeter Huewe <peterhuewe@gmx.de>2015-01-21 18:42:50 -0500
committerJames Morris <james.l.morris@oracle.com>2015-01-21 21:37:33 -0500
commit961be7ef6963806cb978ccd6acf6bf84b0c63346 (patch)
tree39d3de404a55da6507fb7f0061035b26e6b96a27 /drivers/char/tpm
parent9d5a5f65fcabb876cb0092901d56627bd5cbfc44 (diff)
tpm/tpm_tis: Add missing ifdef CONFIG_ACPI for pnp_acpi_device
This fixes a build failure if CONFIG_PNP is set but CONFIG_ACPI is not: drivers/char/tpm/tpm_tis.c: In function ?tpm_tis_pnp_init?: drivers/char/tpm/tpm_tis.c:912:45: error: invalid type argument of ?->? (have ?int?) acpi_dev_handle = pnp_acpi_device(pnp_dev)->handle; If CONFIG_PNPACPI is not set pnp_acpi_device is defined as 0 and thus accesing the handle is not possible. Fixes: 0dc553652102 ("tpm: fix raciness of PPI interface lookup") Reported-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r--drivers/char/tpm/tpm_tis.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 20a61bc98db8..6725bef7cb96 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -908,8 +908,10 @@ static int tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
908 if (is_itpm(pnp_dev)) 908 if (is_itpm(pnp_dev))
909 itpm = true; 909 itpm = true;
910 910
911#ifdef CONFIG_ACPI
911 if (pnp_acpi_device(pnp_dev)) 912 if (pnp_acpi_device(pnp_dev))
912 acpi_dev_handle = pnp_acpi_device(pnp_dev)->handle; 913 acpi_dev_handle = pnp_acpi_device(pnp_dev)->handle;
914#endif
913 915
914 return tpm_tis_init(&pnp_dev->dev, acpi_dev_handle, start, len, irq); 916 return tpm_tis_init(&pnp_dev->dev, acpi_dev_handle, start, len, irq);
915} 917}