Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
To: Li Jun <lijun01@kylinos.cn>
Cc: sudeep.holla@kernel.org, cristian.marussi@arm.com,
	arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] firmware: arm_scmi: pm: use SIMPLE_DEV_PM_OPS for pm struct
Date: Wed, 19 Aug 2026 09:22:45 -0700	[thread overview]
Message-ID: <20260819092245.0000440d@oss.qualcomm.com> (raw)
In-Reply-To: <20260819061530.2391788-1-lijun01@kylinos.cn>

On Wed, 19 Aug 2026 14:15:30 +0800
Li Jun <lijun01@kylinos.cn> wrote:

> use SIMPLE_DEV_PM_OPS for scmi_dev_pm_ops,and add the value of
> .freeze .thaw .poweroff .restore.if these address are null, may cause
> error in s4.
> 
Read the note immediately above the definition of SIMPLE_DEV_PM_OPS

That is slowly going away so I doubt we want to introduce more instances of
it.  So as part of this change, flip to DEFINE_SIMPLE_DEV_PM_OPS()
and make the other changes necessary for that to work correctly

Jonathan


> Signed-off-by: Li Jun <lijun01@kylinos.cn>
> ---
>  drivers/firmware/arm_scmi/bus.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
> index e060edbe7e83..4ab32f1eed4f 100644
> --- a/drivers/firmware/arm_scmi/bus.c
> +++ b/drivers/firmware/arm_scmi/bus.c
> @@ -13,6 +13,7 @@
>  #include <linux/kernel.h>
>  #include <linux/slab.h>
>  #include <linux/device.h>
> +#include <linux/pm.h>
>  
>  #include "common.h"
>  
> @@ -361,10 +362,7 @@ static int scmi_pm_resume(struct device *dev)
>  	return 0;
>  }
>  
> -static const struct dev_pm_ops scmi_dev_pm_ops = {
> -	.suspend = pm_sleep_ptr(scmi_pm_suspend),
> -	.resume = pm_sleep_ptr(scmi_pm_resume),
> -};
> +static SIMPLE_DEV_PM_OPS(scmi_dev_pm_ops, scmi_pm_suspend, scmi_pm_resume);
>  
>  const struct bus_type scmi_bus_type = {
>  	.name =	"scmi_protocol",



      parent reply	other threads:[~2026-08-19 16:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19  6:15 [PATCH] firmware: arm_scmi: pm: use SIMPLE_DEV_PM_OPS for pm struct Li Jun
2026-08-19  7:55 ` Kohei Enju
2026-08-20  2:50   ` lijun
2026-08-19 16:22 ` Jonathan Cameron [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=20260819092245.0000440d@oss.qualcomm.com \
    --to=jonathan.cameron@oss.qualcomm.com \
    --cc=arm-scmi@vger.kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=lijun01@kylinos.cn \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=sudeep.holla@kernel.org \
    /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