Skip to content

Commit 8516b23

Browse files
niklas88jarkkojs
authored andcommitted
char: tpm: Keep TPM_INF_IO_PORT define for HAS_IOPORT=n
The recent change to handle HAS_IOPORT removed the TPM_INF_IO_PORT define for the HAS_IOPORT=n case despite the define being used in sections of code not covered by the same ifdef check. This was missed because at the moment TCG_INFINEON indirectly depends on HAS_IOPORT via PNP which depends on ACPI || ISA. As TCG_INFINEON does in principle support MMIO only use add it for COMPILE_TEST to cover the HAS_IOPORT=n case. Link: https://lore.kernel.org/lkml/9d9fa267-067e-421b-9a39-aa178b913298@app.fastmail.com/ Fixes: dab56f8 ("char: tpm: handle HAS_IOPORT dependencies") Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
1 parent 45121fc commit 8516b23

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/char/tpm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ config TCG_ATMEL
157157

158158
config TCG_INFINEON
159159
tristate "Infineon Technologies TPM Interface"
160-
depends on PNP
160+
depends on PNP || COMPILE_TEST
161161
help
162162
If you have a TPM security chip from Infineon Technologies
163163
(either SLD 9630 TT 1.1 or SLB 9635 TT 1.2) say Yes and it

drivers/char/tpm/tpm_infineon.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
#define TPM_MAX_TRIES 5000
2727
#define TPM_INFINEON_DEV_VEN_VALUE 0x15D1
2828

29-
#ifdef CONFIG_HAS_IOPORT
3029
#define TPM_INF_IO_PORT 0x0
31-
#endif
3230
#define TPM_INF_IO_MEM 0x1
3331

3432
#define TPM_INF_ADDR 0x0

0 commit comments

Comments
 (0)