* [PATCH] tpm: tpm_tis_spi: fix nodef CR50 tpm_tis_spi_resume is null
@ 2026-08-12 10:09 Li Jun
2026-08-20 23:36 ` Jarkko Sakkinen
0 siblings, 1 reply; 2+ messages in thread
From: Li Jun @ 2026-08-12 10:09 UTC (permalink / raw)
To: lijun01, peterhuewe, jarkko, jgg, linux-integrity
if no define CONFIG_TCG_TIS_SPI_CR50 in config,
the add of tpm_tis_spi_resume is null, this cause the tpm chip to
fail to resume.
Signed-off-by: Li Jun <lijun01@kylinos.cn>
---
drivers/char/tpm/tpm_tis_spi.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_tis_spi.h b/drivers/char/tpm/tpm_tis_spi.h
index d0f66f6f1931..ced416ecd92c 100644
--- a/drivers/char/tpm/tpm_tis_spi.h
+++ b/drivers/char/tpm/tpm_tis_spi.h
@@ -40,8 +40,12 @@ static inline int cr50_spi_probe(struct spi_device *spi)
}
#endif
-#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_TCG_TIS_SPI_CR50)
-extern int tpm_tis_spi_resume(struct device *dev);
+#if defined(CONFIG_PM_SLEEP)
+ #if defined(CONFIG_TCG_TIS_SPI_CR50)
+ extern int tpm_tis_spi_resume(struct device *dev);
+ #else
+ #define tpm_tis_spi_resume tpm_tis_resume
+ #endif
#else
#define tpm_tis_spi_resume NULL
#endif
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tpm: tpm_tis_spi: fix nodef CR50 tpm_tis_spi_resume is null
2026-08-12 10:09 [PATCH] tpm: tpm_tis_spi: fix nodef CR50 tpm_tis_spi_resume is null Li Jun
@ 2026-08-20 23:36 ` Jarkko Sakkinen
0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2026-08-20 23:36 UTC (permalink / raw)
To: Li Jun; +Cc: peterhuewe, jgg, linux-integrity
On Wed, Aug 12, 2026 at 06:09:14PM +0800, Li Jun wrote:
> if no define CONFIG_TCG_TIS_SPI_CR50 in config,
> the add of tpm_tis_spi_resume is null, this cause the tpm chip to
> fail to resume.
>
> Signed-off-by: Li Jun <lijun01@kylinos.cn>
> ---
> drivers/char/tpm/tpm_tis_spi.h | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm_tis_spi.h b/drivers/char/tpm/tpm_tis_spi.h
> index d0f66f6f1931..ced416ecd92c 100644
> --- a/drivers/char/tpm/tpm_tis_spi.h
> +++ b/drivers/char/tpm/tpm_tis_spi.h
> @@ -40,8 +40,12 @@ static inline int cr50_spi_probe(struct spi_device *spi)
> }
> #endif
>
> -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_TCG_TIS_SPI_CR50)
> -extern int tpm_tis_spi_resume(struct device *dev);
> +#if defined(CONFIG_PM_SLEEP)
> + #if defined(CONFIG_TCG_TIS_SPI_CR50)
> + extern int tpm_tis_spi_resume(struct device *dev);
> + #else
> + #define tpm_tis_spi_resume tpm_tis_resume
> + #endif
> #else
> #define tpm_tis_spi_resume NULL
> #endif
> --
> 2.25.1
>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
thanks
BR, Jarkko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-20 23:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 10:09 [PATCH] tpm: tpm_tis_spi: fix nodef CR50 tpm_tis_spi_resume is null Li Jun
2026-08-20 23:36 ` Jarkko Sakkinen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.