From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Diederik de Haas <diederik@cknow-tech.com>
Cc: Dafna Hirschfeld <dafna@fastmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Detlev Casanova <detlev.casanova@collabora.com>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
Jacob Chen <jacob-chen@iotwrt.com>,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] media: rkisp1: Switch to modern PM_OPS
Date: Fri, 2 Oct 2026 04:46:40 +0300 [thread overview]
Message-ID: <20261002014640.GB101842@killaraus.ideasonboard.com> (raw)
In-Reply-To: <20261001173610.158931-4-diederik@cknow-tech.com>
On Thu, Oct 01, 2026 at 07:34:53PM +0200, Diederik de Haas wrote:
> A new set of modern PM_OPS macros got defined in commit
> 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones")
>
> Switch to those new macros so that the PM callbacks are always seen by the
> compiler, but discarded if not used. This lets us drop the __maybe_unused
> annotation from the callback functions.
>
> Signed-off-by: Diederik de Haas <diederik@cknow-tech.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
As the three patches in this series are independent from each other,
I've taken this in my tree.
> ---
> drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> index f90e01301943..e619a949dbc9 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> @@ -305,7 +305,7 @@ static int rkisp1_subdev_notifier_register(struct rkisp1_device *rkisp1)
> * Power
> */
>
> -static int __maybe_unused rkisp1_runtime_suspend(struct device *dev)
> +static int rkisp1_runtime_suspend(struct device *dev)
> {
> struct rkisp1_device *rkisp1 = dev_get_drvdata(dev);
>
> @@ -331,7 +331,7 @@ static int __maybe_unused rkisp1_runtime_suspend(struct device *dev)
> return pinctrl_pm_select_sleep_state(dev);
> }
>
> -static int __maybe_unused rkisp1_runtime_resume(struct device *dev)
> +static int rkisp1_runtime_resume(struct device *dev)
> {
> struct rkisp1_device *rkisp1 = dev_get_drvdata(dev);
> int ret;
> @@ -351,9 +351,8 @@ static int __maybe_unused rkisp1_runtime_resume(struct device *dev)
> }
>
> static const struct dev_pm_ops rkisp1_pm_ops = {
> - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
> - pm_runtime_force_resume)
> - SET_RUNTIME_PM_OPS(rkisp1_runtime_suspend, rkisp1_runtime_resume, NULL)
> + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
> + RUNTIME_PM_OPS(rkisp1_runtime_suspend, rkisp1_runtime_resume, NULL)
> };
>
> /* ----------------------------------------------------------------------------
> @@ -815,7 +814,7 @@ static struct platform_driver rkisp1_drv = {
> .driver = {
> .name = RKISP1_DRIVER_NAME,
> .of_match_table = of_match_ptr(rkisp1_of_match),
> - .pm = &rkisp1_pm_ops,
> + .pm = pm_ptr(&rkisp1_pm_ops),
> },
> .probe = rkisp1_probe,
> .remove = rkisp1_remove,
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2026-10-02 1:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 17:34 [PATCH 0/3] media: rockchip: Modernize PM_OPS Diederik de Haas
2026-10-01 17:34 ` [PATCH 1/3] media: rkvdec: Switch to modern PM_OPS Diederik de Haas
2026-10-02 19:55 ` Nicolas Dufresne
2026-10-01 17:34 ` [PATCH 2/3] media: rockchip: rga: " Diederik de Haas
2026-10-02 19:56 ` Nicolas Dufresne
2026-10-01 17:34 ` [PATCH 3/3] media: rkisp1: " Diederik de Haas
2026-10-02 1:46 ` Laurent Pinchart [this message]
2026-10-02 19:57 ` [PATCH 0/3] media: rockchip: Modernize PM_OPS Nicolas Dufresne
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=20261002014640.GB101842@killaraus.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=dafna@fastmail.com \
--cc=detlev.casanova@collabora.com \
--cc=diederik@cknow-tech.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=heiko@sntech.de \
--cc=jacob-chen@iotwrt.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@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
all inboxes | Powered by JetHome®