From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Triet Hoang <triet.hoang.dev@gmail.com>
Cc: mchehab@kernel.org, michal.simek@amd.com,
linux-media@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Subject: Re: [PATCH] [media] v4l: xilinx: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Date: Tue, 25 Aug 2026 00:06:53 +0200 [thread overview]
Message-ID: <20260824220653.GA727417@killaraus.ideasonboard.com> (raw)
In-Reply-To: <20260821071125.213335-1-triet.hoang.dev@gmail.com>
Hi Triet,
Thank you for the patch.
I'm CC'ing Tomi Valkeinen who is currently working on the Xilinx V4L2
drivers. Tomi, could you handle this patch ?
On Fri, Aug 21, 2026 at 02:11:24PM +0700, Triet Hoang wrote:
> Convert the deprecated SIMPLE_DEV_PM_OPS
> to DEFINE_SIMPLE_DEV_PM_OPS
> and pm_sleep_ptr().
>
> This lets us drop the __maybe_unused annotations
> from its suspend and resume callbacks,
> also reduces kernel size in case CONFIG_PM or
> CONFIG_PM_SLEEP is disabled.
>
> Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com>
> ---
> drivers/media/platform/xilinx/xilinx-tpg.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c b/drivers/media/platform/xilinx/xilinx-tpg.c
> index 7deec6e37edc..8bac01084605 100644
> --- a/drivers/media/platform/xilinx/xilinx-tpg.c
> +++ b/drivers/media/platform/xilinx/xilinx-tpg.c
> @@ -686,7 +686,7 @@ static const struct media_entity_operations xtpg_media_ops = {
> * Power Management
> */
>
> -static int __maybe_unused xtpg_pm_suspend(struct device *dev)
> +static int xtpg_pm_suspend(struct device *dev)
> {
> struct xtpg_device *xtpg = dev_get_drvdata(dev);
>
> @@ -695,7 +695,7 @@ static int __maybe_unused xtpg_pm_suspend(struct device *dev)
> return 0;
> }
>
> -static int __maybe_unused xtpg_pm_resume(struct device *dev)
> +static int xtpg_pm_resume(struct device *dev)
> {
> struct xtpg_device *xtpg = dev_get_drvdata(dev);
>
> @@ -895,7 +895,7 @@ static void xtpg_remove(struct platform_device *pdev)
> xvip_cleanup_resources(&xtpg->xvip);
> }
>
> -static SIMPLE_DEV_PM_OPS(xtpg_pm_ops, xtpg_pm_suspend, xtpg_pm_resume);
> +static DEFINE_SIMPLE_DEV_PM_OPS(xtpg_pm_ops, xtpg_pm_suspend, xtpg_pm_resume);
>
> static const struct of_device_id xtpg_of_id_table[] = {
> { .compatible = "xlnx,v-tpg-5.0" },
> @@ -906,7 +906,7 @@ MODULE_DEVICE_TABLE(of, xtpg_of_id_table);
> static struct platform_driver xtpg_driver = {
> .driver = {
> .name = "xilinx-tpg",
> - .pm = &xtpg_pm_ops,
> + .pm = pm_sleep_ptr(&xtpg_pm_ops),
> .of_match_table = xtpg_of_id_table,
> },
> .probe = xtpg_probe,
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2026-08-24 22:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 7:11 [PATCH] [media] v4l: xilinx: Convert to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
2026-08-24 22:06 ` Laurent Pinchart [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=20260824220653.GA727417@killaraus.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=michal.simek@amd.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=triet.hoang.dev@gmail.com \
/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