* [PATCH] tpm: remove extraneous #ifdef
@ 2026-09-15 20:12 Arnd Bergmann
0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2026-09-15 20:12 UTC (permalink / raw)
To: Peter Huewe, Jarkko Sakkinen, Li Jun
Cc: Arnd Bergmann, Jason Gunthorpe, linux-integrity, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Changing to DEFINE_SIMPLE_DEV_PM_OPS() broke here because the
tpm_inf_resume() function is hidden in an #ifdef:
drivers/char/tpm/tpm_infineon.c:615:61: error: 'tpm_inf_resume' undeclared here (not in a function); did you mean 'tpm_pm_resume'?
615 | static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume);
| ^~~~~~~~~~~~~~
Remove the #ifdef check.
Fixes: 2249200ee420 ("tpm: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/char/tpm/tpm_infineon.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c
index 84a0d3e5f679..d6edd2ca39a5 100644
--- a/drivers/char/tpm/tpm_infineon.c
+++ b/drivers/char/tpm/tpm_infineon.c
@@ -594,7 +594,6 @@ static void tpm_inf_pnp_remove(struct pnp_dev *dev)
}
}
-#ifdef CONFIG_PM_SLEEP
static int tpm_inf_resume(struct device *dev)
{
/* Re-configure TPM after suspending */
@@ -611,7 +610,7 @@ static int tpm_inf_resume(struct device *dev)
tpm_data_out(RESET_LP_IRQC_DISABLE, CMD);
return tpm_pm_resume(dev);
}
-#endif
+
static DEFINE_SIMPLE_DEV_PM_OPS(tpm_inf_pm, tpm_pm_suspend, tpm_inf_resume);
static struct pnp_driver tpm_inf_pnp_driver = {
--
2.53.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-15 20:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 20:12 [PATCH] tpm: remove extraneous #ifdef Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®