summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorLi Jun <lijun01@kylinos.cn>2026-08-12 18:09:14 +0800
committerJarkko Sakkinen <jarkko@kernel.org>2026-08-25 18:13:34 +0300
commitb4d1adc70471d0752bba674552d19971ed9fa869 (patch)
tree3908a901ffe3208673f808c8463cffaa9b6342d6 /drivers/char
parent4bfacee94f309346bef0b598ea091088b9150af9 (diff)
downloadlinux-next-b4d1adc70471d0752bba674552d19971ed9fa869.tar.gz
linux-next-b4d1adc70471d0752bba674552d19971ed9fa869.zip
tpm: tpm_tis_spi: fix nodef CR50 tpm_tis_spi_resume is null
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> Link: https://lore.kernel.org/r/20260812100914.3540149-1-lijun01@kylinos.cn Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_tis_spi.h8
1 files 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