Skip to content

Commit

Permalink
tpm_tis: fix build when ACPI is not enabled
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Leendert van Doorn <[email protected]>
Cc: James Morris <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rddunlap authored and torvalds committed Aug 4, 2011
1 parent 3dab1bc commit 1560ffe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ enum tis_defaults {
static LIST_HEAD(tis_chips);
static DEFINE_SPINLOCK(tis_lock);

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

return 0;
}
#else
static inline int is_itpm(struct pnp_dev *dev)
{
return 0;
}
#endif

static int check_locality(struct tpm_chip *chip, int l)
Expand Down

0 comments on commit 1560ffe

Please sign in to comment.