mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user