linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: vsp1: Make use of the helper function devm_platform_ioremap_resource()
Date: Thu, 23 Sep 2021 01:47:40 +0300	[thread overview]
Message-ID: <YUuyjEibbug/Taal@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20210901055709.8079-1-caihuoqing@baidu.com>

Hi Cai,

Thank you for the patch.

On Wed, Sep 01, 2021 at 01:57:08PM +0800, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>

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

> ---
>  drivers/media/platform/vsp1/vsp1_drv.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
> index de442d6c9926..8acd6d45d8d0 100644
> --- a/drivers/media/platform/vsp1/vsp1_drv.c
> +++ b/drivers/media/platform/vsp1/vsp1_drv.c
> @@ -785,7 +785,6 @@ static int vsp1_probe(struct platform_device *pdev)
>  	struct vsp1_device *vsp1;
>  	struct device_node *fcp_node;
>  	struct resource *irq;
> -	struct resource *io;
>  	unsigned int i;
>  	int ret;
>  
> @@ -800,8 +799,7 @@ static int vsp1_probe(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, vsp1);
>  
>  	/* I/O and IRQ resources (clock managed by the clock PM domain). */
> -	io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	vsp1->mmio = devm_ioremap_resource(&pdev->dev, io);
> +	vsp1->mmio = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(vsp1->mmio))
>  		return PTR_ERR(vsp1->mmio);
>  

-- 
Regards,

Laurent Pinchart

      parent reply	other threads:[~2021-09-22 22:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  5:57 [PATCH] media: vsp1: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-01  8:15 ` Kieran Bingham
2021-09-22 22:47 ` 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=YUuyjEibbug/Taal@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=caihuoqing@baidu.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).