aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2013-11-26 15:30:46 -0500
committerPeter Huewe <peterhuewe@gmx.de>2014-01-06 08:37:25 -0500
commit19b94d2df5349acb7785fd7bc96a98541b07916c (patch)
treeb950982a28a220e9f847cfc83115ea1988157a7b /drivers/char/tpm
parente3302e0d6dcc02f369ecdc01c8392a28f14c0cba (diff)
tpm: tpm_tis: Fix compile problems with CONFIG_PM_SLEEP/CONFIG_PNP
If CONFIG_PM_SLEEP=n, CONFIG_PNP=y we get this warning: drivers/char/tpm/tpm_tis.c:706:13: warning: 'tpm_tis_reenable_interrupts' defined but not used [-Wunused-function] This seems to have been introduced in a2fa3fb0d 'tpm: convert tpm_tis driver to use dev_pm_ops from legacy pm_ops' Also, unpon reviewing, the #ifdefs around tpm_tis_pm are not right, the first reference is protected, the second is not. tpm_tis_pm is always defined so we can drop the #ifdef. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r--drivers/char/tpm/tpm_tis.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 8094b081a8be..a9ed2270c25d 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -702,7 +702,7 @@ out_err:
702 return rc; 702 return rc;
703} 703}
704 704
705#if defined(CONFIG_PNP) || defined(CONFIG_PM_SLEEP) 705#ifdef CONFIG_PM_SLEEP
706static void tpm_tis_reenable_interrupts(struct tpm_chip *chip) 706static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
707{ 707{
708 u32 intmask; 708 u32 intmask;
@@ -723,9 +723,7 @@ static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
723 iowrite32(intmask, 723 iowrite32(intmask,
724 chip->vendor.iobase + TPM_INT_ENABLE(chip->vendor.locality)); 724 chip->vendor.iobase + TPM_INT_ENABLE(chip->vendor.locality));
725} 725}
726#endif
727 726
728#ifdef CONFIG_PM_SLEEP
729static int tpm_tis_resume(struct device *dev) 727static int tpm_tis_resume(struct device *dev)
730{ 728{
731 struct tpm_chip *chip = dev_get_drvdata(dev); 729 struct tpm_chip *chip = dev_get_drvdata(dev);
@@ -794,11 +792,9 @@ static struct pnp_driver tis_pnp_driver = {
794 .id_table = tpm_pnp_tbl, 792 .id_table = tpm_pnp_tbl,
795 .probe = tpm_tis_pnp_init, 793 .probe = tpm_tis_pnp_init,
796 .remove = tpm_tis_pnp_remove, 794 .remove = tpm_tis_pnp_remove,
797#ifdef CONFIG_PM_SLEEP
798 .driver = { 795 .driver = {
799 .pm = &tpm_tis_pm, 796 .pm = &tpm_tis_pm,
800 }, 797 },
801#endif
802}; 798};
803 799
804#define TIS_HID_USR_IDX sizeof(tpm_pnp_tbl)/sizeof(struct pnp_device_id) -2 800#define TIS_HID_USR_IDX sizeof(tpm_pnp_tbl)/sizeof(struct pnp_device_id) -2