mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tpm: fix build regression for tpm_tis_resume
@ 2026-09-15 20:12 Arnd Bergmann
  2026-09-16  9:24 ` Breno Leitao
  0 siblings, 1 reply; 2+ messages 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, Jim Broadus, Alec Brown,
	Daniel P. Smith, Ross Philipson, linux-integrity, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Using DEFINE_SIMPLE_DEV_PM_OPS means that there is no a code reference
to the unused tpm_tis_resume, but that fails here since the declaration
is hidden:

drivers/char/tpm/tpm_tis_i2c.c:322:61: error: 'tpm_tis_resume' undeclared here (not in a function); did you mean 'tpm_tis_remove'?
  322 | static DEFINE_SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_resume);
      |                                                             ^~~~~~~~~~~~~~

Remove the incorrect #ifdef.

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_tis_core.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
index d737b3d67411..741130056876 100644
--- a/drivers/char/tpm/tpm_tis_core.h
+++ b/drivers/char/tpm/tpm_tis_core.h
@@ -161,8 +161,6 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 		      const struct tpm_tis_phy_ops *phy_ops,
 		      acpi_handle acpi_dev_handle);
 
-#ifdef CONFIG_PM_SLEEP
 int tpm_tis_resume(struct device *dev);
-#endif
 
 #endif
-- 
2.53.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] tpm: fix build regression for tpm_tis_resume
  2026-09-15 20:12 [PATCH] tpm: fix build regression for tpm_tis_resume Arnd Bergmann
@ 2026-09-16  9:24 ` Breno Leitao
  0 siblings, 0 replies; 2+ messages in thread
From: Breno Leitao @ 2026-09-16  9:24 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Peter Huewe, Jarkko Sakkinen, Li Jun, Arnd Bergmann,
	Jason Gunthorpe, Jim Broadus, Alec Brown, Daniel P. Smith,
	Ross Philipson, linux-integrity, linux-kernel

On Tue, Sep 15, 2026 at 10:12:29PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Using DEFINE_SIMPLE_DEV_PM_OPS means that there is no a code reference
> to the unused tpm_tis_resume, but that fails here since the declaration
> is hidden:
> 
> drivers/char/tpm/tpm_tis_i2c.c:322:61: error: 'tpm_tis_resume' undeclared here (not in a function); did you mean 'tpm_tis_remove'?
>   322 | static DEFINE_SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_resume);
>       |                                                             ^~~~~~~~~~~~~~
> 
> Remove the incorrect #ifdef.
> 
> Fixes: 2249200ee420 ("tpm: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Tested-by: Breno Leitao <leitao@debian.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-16  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 20:12 [PATCH] tpm: fix build regression for tpm_tis_resume Arnd Bergmann
2026-09-16  9:24 ` Breno Leitao

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®