Skip to content

Commit

Permalink
tpm: compile out unused code in the PNP and PM cases
Browse files Browse the repository at this point in the history
The tpm_tis driver doesn't use tpm_tis_resume except when PM is
configured and doesn't make use of tpm_tis_reenable_interrupts except
when PM or PNP is configured.

Signed-off-by: Kent Yoder <[email protected]>
  • Loading branch information
Kent Yoder committed Aug 22, 2012
1 parent dd7da13 commit 7e72fe7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
return rc;
}

#if defined(CONFIG_PNP) || defined(CONFIG_PM_SLEEP)
static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
{
u32 intmask;
Expand All @@ -725,7 +726,7 @@ static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
iowrite32(intmask,
chip->vendor.iobase + TPM_INT_ENABLE(chip->vendor.locality));
}

#endif

#ifdef CONFIG_PNP
static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
Expand Down

0 comments on commit 7e72fe7

Please sign in to comment.