Skip to contentSkip to conversation

tpm: fix build regression for tpm_tis_resume

PATCH In review Arnd Bergmann 3 participants 3 messages Sep 15 – Sep 18

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tpm: fix build regression for tpm_tis_resume

From: Arnd Bergmann <[email protected]>

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()")
---
 drivers/char/tpm/tpm_tis_core.h | 2 --
 1 file changed, 2 deletions(-)
drivers/char/tpm/tpm_tis_core.h +0 -2
index d737b3d67411..741130056876 100644
@@ -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
Signature · 1 line
2.53.0
Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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:

Quoted 8 lines

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()")
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 34 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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()")
---
 drivers/char/tpm/tpm_tis_core.h | 2 --
 1 file changed, 2 deletions(-)
drivers/char/tpm/tpm_tis_core.h +0 -2
index d737b3d67411..741130056876 100644
@@ -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
Signature · 1 line
2.53.0

BR, Jarkko