All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Li Jun <lijun01@kylinos.cn>
Cc: peterhuewe@gmx.de, jgg@ziepe.ca, linux-integrity@vger.kernel.org
Subject: Re: [PATCH] tpm: tpm_tis_spi: fix nodef CR50 tpm_tis_spi_resume is null
Date: Fri, 21 Aug 2026 02:36:05 +0300	[thread overview]
Message-ID: <aoePZSImVOBKHyZ4@kernel.org> (raw)
In-Reply-To: <20260812100914.3540149-1-lijun01@kylinos.cn>

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

      reply	other threads:[~2026-08-20 23:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aoePZSImVOBKHyZ4@kernel.org \
    --to=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=lijun01@kylinos.cn \
    --cc=linux-integrity@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.