All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: "Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Rob Herring" <robh@kernel.org>,
	"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	linux-media@vger.kernel.org,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Biju Das" <biju.das.au@gmail.com>,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2 RESEND 1/4] media: platform: rzg2l-cru: rzg2l-csi2: Switch to RUNTIME_PM_OPS()
Date: Wed, 7 Feb 2024 18:38:44 +0200	[thread overview]
Message-ID: <20240207163844.GA7331@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20240130164115.116613-2-biju.das.jz@bp.renesas.com>

Hi Biju,

Thank you for the patch.

On Tue, Jan 30, 2024 at 04:41:12PM +0000, Biju Das wrote:
> Replace the old SET_RUNTIME_PM_OPS() helpers with its modern alternative
> RUNTIME_PM_OPS(). The usage of pm_ptr and RUNTIME_PM_OPS() allows the
> compiler to see where it's used but still drop the dead code. After this
> we can get rid of the unnecessary '__maybe_unused' annotations on PM
> functions.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> ---
> v1->v2:
>  * Updated commit description.
>  * Aligned RUNTIME_PM_OPS() macro.
> ---
>  drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> index d20f4eff93a4..e00d9379dd2c 100644
> --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> @@ -834,7 +834,7 @@ static void rzg2l_csi2_remove(struct platform_device *pdev)
>  	pm_runtime_disable(&pdev->dev);
>  }
>  
> -static int __maybe_unused rzg2l_csi2_pm_runtime_suspend(struct device *dev)
> +static int rzg2l_csi2_pm_runtime_suspend(struct device *dev)
>  {
>  	struct rzg2l_csi2 *csi2 = dev_get_drvdata(dev);
>  
> @@ -843,7 +843,7 @@ static int __maybe_unused rzg2l_csi2_pm_runtime_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int __maybe_unused rzg2l_csi2_pm_runtime_resume(struct device *dev)
> +static int rzg2l_csi2_pm_runtime_resume(struct device *dev)
>  {
>  	struct rzg2l_csi2 *csi2 = dev_get_drvdata(dev);
>  
> @@ -851,7 +851,8 @@ static int __maybe_unused rzg2l_csi2_pm_runtime_resume(struct device *dev)
>  }
>  
>  static const struct dev_pm_ops rzg2l_csi2_pm_ops = {
> -	SET_RUNTIME_PM_OPS(rzg2l_csi2_pm_runtime_suspend, rzg2l_csi2_pm_runtime_resume, NULL)
> +	RUNTIME_PM_OPS(rzg2l_csi2_pm_runtime_suspend,
> +		       rzg2l_csi2_pm_runtime_resume, NULL)
>  };
>  
>  static const struct of_device_id rzg2l_csi2_of_table[] = {
> @@ -865,7 +866,7 @@ static struct platform_driver rzg2l_csi2_pdrv = {
>  	.driver	= {
>  		.name = "rzg2l-csi2",
>  		.of_match_table = rzg2l_csi2_of_table,
> -		.pm = &rzg2l_csi2_pm_ops,
> +		.pm = pm_ptr(&rzg2l_csi2_pm_ops),
>  	},
>  };
>  

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2024-02-07 16:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 16:41 [PATCH v2 RESEND 0/4] RZ/G2L CSI/CRU improvements Biju Das
2024-01-30 16:41 ` [PATCH v2 RESEND 1/4] media: platform: rzg2l-cru: rzg2l-csi2: Switch to RUNTIME_PM_OPS() Biju Das
2024-02-07 16:38   ` Laurent Pinchart [this message]
2024-01-30 16:41 ` [PATCH v2 RESEND 2/4] media: platform: rzg2l-cru: rzg2l-ip: Add delay after D-PHY reset Biju Das
2024-01-30 16:41 ` [PATCH v2 RESEND 3/4] media: platform: rzg2l-cru: rzg2l-video: Fix image processing initialization Biju Das
2024-01-30 16:41 ` [PATCH v2 RESEND 4/4] media: platform: rzg2l-cru: rzg2l-video: Restructure clk handling Biju Das
2024-02-07 21:59   ` Laurent Pinchart
2024-02-13 16:36     ` Biju Das

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=20240207163844.GA7331@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=u.kleine-koenig@pengutronix.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.