Skip to content

Commit 1560ffe

Browse files
rddunlaptorvalds
authored andcommitted
tpm_tis: fix build when ACPI is not enabled
Fix tpm_tis.c build when CONFIG_ACPI is not enabled by providing a stub function. Fixes many build errors/warnings: drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name' drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union ... Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Leendert van Doorn <leendert@watson.ibm.com> Cc: James Morris <jmorris@namei.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3dab1bc commit 1560ffe

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎drivers/char/tpm/tpm_tis.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ enum tis_defaults {
8080
static LIST_HEAD(tis_chips);
8181
static DEFINE_SPINLOCK(tis_lock);
8282

83-
#ifdef CONFIG_PNP
83+
#if defined(CONFIG_PNP) && defined(CONFIG_ACPI)
8484
static int is_itpm(struct pnp_dev *dev)
8585
{
8686
struct acpi_device *acpi = pnp_acpi_device(dev);
@@ -93,6 +93,11 @@ static int is_itpm(struct pnp_dev *dev)
9393

9494
return 0;
9595
}
96+
#else
97+
static inline int is_itpm(struct pnp_dev *dev)
98+
{
99+
return 0;
100+
}
96101
#endif
97102

98103
static int check_locality(struct tpm_chip *chip, int l)

0 commit comments

Comments
 (0)