Linux Integrity Measurement development
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Li Jun <lijun01@kylinos.cn>
Cc: maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com,
	chleroy@kernel.org, peterhuewe@gmx.de, jgg@ziepe.ca,
	linuxppc-dev@lists.ozlabs.org, linux-integrity@vger.kernel.org
Subject: Re: [PATCH] char: tpm: Use SIMPLE_DEV_PM_OPS for ibmvtpm power management
Date: Fri, 21 Aug 2026 04:16:33 +0300	[thread overview]
Message-ID: <aoem8QbOVD7QVwiG@kernel.org> (raw)
In-Reply-To: <20260819083547.2703228-1-lijun01@kylinos.cn>

On Wed, Aug 19, 2026 at 04:35:47PM +0800, Li Jun wrote:
> Replace the manually defined dev_pm_ops structure with the
> SIMPLE_DEV_PM_OPS macro to simplify the power management code.
> This macro automatically handles CONFIG_PM_SLEEP configuration,
> generating the same suspend/resume callbacks while reducing
> boilerplate code.Add the value of 'thaw,freeze,poweroff,restore'.
> 
> Signed-off-by: Li Jun <lijun01@kylinos.cn>
> ---
>  drivers/char/tpm/tpm_ibmvtpm.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c
> index 6fb4d30eb6f6..51c7e2add3d2 100644
> --- a/drivers/char/tpm/tpm_ibmvtpm.c
> +++ b/drivers/char/tpm/tpm_ibmvtpm.c
> @@ -462,10 +462,7 @@ static const struct tpm_class_ops tpm_ibmvtpm = {
>  	.req_canceled = tpm_ibmvtpm_req_canceled,
>  };
>  
> -static const struct dev_pm_ops tpm_ibmvtpm_pm_ops = {
> -	.suspend = tpm_ibmvtpm_suspend,
> -	.resume = tpm_ibmvtpm_resume,
> -};
> +static SIMPLE_DEV_PM_OPS(tpm_ibmvtpm_pm_ops, tpm_ibmvtpm_suspend, tpm_ibmvtpm_resume);
>  
>  /**
>   * ibmvtpm_crq_get_next - Get next responded crq
> -- 
> 2.25.1
> 

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko

      reply	other threads:[~2026-08-21  1:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19  8:35 [PATCH] char: tpm: Use SIMPLE_DEV_PM_OPS for ibmvtpm power management Li Jun
2026-08-21  1:16 ` 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=aoem8QbOVD7QVwiG@kernel.org \
    --to=jarkko@kernel.org \
    --cc=chleroy@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=lijun01@kylinos.cn \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox