mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-26 16:23:57 +00:00
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>
This commit is contained in:
parent
e3302e0d6d
commit
19b94d2df5
1 changed files with 1 additions and 5 deletions
|
@ -702,7 +702,7 @@ out_err:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_PNP) || defined(CONFIG_PM_SLEEP)
|
#ifdef CONFIG_PM_SLEEP
|
||||||
static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
|
static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
|
||||||
{
|
{
|
||||||
u32 intmask;
|
u32 intmask;
|
||||||
|
@ -723,9 +723,7 @@ static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
|
||||||
iowrite32(intmask,
|
iowrite32(intmask,
|
||||||
chip->vendor.iobase + TPM_INT_ENABLE(chip->vendor.locality));
|
chip->vendor.iobase + TPM_INT_ENABLE(chip->vendor.locality));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
|
||||||
static int tpm_tis_resume(struct device *dev)
|
static int tpm_tis_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct tpm_chip *chip = dev_get_drvdata(dev);
|
struct tpm_chip *chip = dev_get_drvdata(dev);
|
||||||
|
@ -794,11 +792,9 @@ static struct pnp_driver tis_pnp_driver = {
|
||||||
.id_table = tpm_pnp_tbl,
|
.id_table = tpm_pnp_tbl,
|
||||||
.probe = tpm_tis_pnp_init,
|
.probe = tpm_tis_pnp_init,
|
||||||
.remove = tpm_tis_pnp_remove,
|
.remove = tpm_tis_pnp_remove,
|
||||||
#ifdef CONFIG_PM_SLEEP
|
|
||||||
.driver = {
|
.driver = {
|
||||||
.pm = &tpm_tis_pm,
|
.pm = &tpm_tis_pm,
|
||||||
},
|
},
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TIS_HID_USR_IDX sizeof(tpm_pnp_tbl)/sizeof(struct pnp_device_id) -2
|
#define TIS_HID_USR_IDX sizeof(tpm_pnp_tbl)/sizeof(struct pnp_device_id) -2
|
||||||
|
|
Loading…
Add table
Reference in a new issue