Skip to content

Commit 7e72fe7

Browse files
author
Kent Yoder
committed
tpm: compile out unused code in the PNP and PM cases
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]>
1 parent dd7da13 commit 7e72fe7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/char/tpm/tpm_tis.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
705705
return rc;
706706
}
707707

708+
#if defined(CONFIG_PNP) || defined(CONFIG_PM_SLEEP)
708709
static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
709710
{
710711
u32 intmask;
@@ -725,7 +726,7 @@ static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
725726
iowrite32(intmask,
726727
chip->vendor.iobase + TPM_INT_ENABLE(chip->vendor.locality));
727728
}
728-
729+
#endif
729730

730731
#ifdef CONFIG_PNP
731732
static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,

0 commit comments

Comments
 (0)