summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Yoder <key@linux.vnet.ibm.com>2012-08-09 09:20:15 -0500
committerKent Yoder <key@linux.vnet.ibm.com>2012-08-22 11:12:03 -0500
commit7e72fe73bfc7e4219b8dd212026c7113f4e37f91 (patch)
tree5c6af208990e86fc9e0c88ae7f05496dec1e8a87
parentdd7da132f7f04f34074efd134847a818ea29ddd7 (diff)
downloadlinux-7e72fe73bfc7e4219b8dd212026c7113f4e37f91.tar.bz2
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 <key@linux.vnet.ibm.com>
-rw-r--r--drivers/char/tpm/tpm_tis.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index c4be3519a587..6bdf2671254f 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -705,6 +705,7 @@ out_err:
return rc;
}
+#if defined(CONFIG_PNP) || defined(CONFIG_PM_SLEEP)
static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
{
u32 intmask;
@@ -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,