linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: rcar_fdp1: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-01  5:55 Cai Huoqing
  2021-09-01  8:16 ` Kieran Bingham
  0 siblings, 1 reply; 2+ messages in thread
From: Cai Huoqing @ 2021-09-01  5:55 UTC (permalink / raw)
  To: caihuoqing
  Cc: Kieran Bingham, Mauro Carvalho Chehab, linux-media,
	linux-renesas-soc, linux-kernel

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>
---
 drivers/media/platform/rcar_fdp1.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/rcar_fdp1.c b/drivers/media/platform/rcar_fdp1.c
index 89aac60066d9..19de3c19bcca 100644
--- a/drivers/media/platform/rcar_fdp1.c
+++ b/drivers/media/platform/rcar_fdp1.c
@@ -2256,7 +2256,6 @@ static int fdp1_probe(struct platform_device *pdev)
 	struct fdp1_dev *fdp1;
 	struct video_device *vfd;
 	struct device_node *fcp_node;
-	struct resource *res;
 	struct clk *clk;
 	unsigned int i;
 
@@ -2283,8 +2282,7 @@ static int fdp1_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, fdp1);
 
 	/* Memory-mapped registers */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	fdp1->regs = devm_ioremap_resource(&pdev->dev, res);
+	fdp1->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(fdp1->regs))
 		return PTR_ERR(fdp1->regs);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: rcar_fdp1: Make use of the helper function devm_platform_ioremap_resource()
  2021-09-01  5:55 [PATCH] media: rcar_fdp1: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
@ 2021-09-01  8:16 ` Kieran Bingham
  0 siblings, 0 replies; 2+ messages in thread
From: Kieran Bingham @ 2021-09-01  8:16 UTC (permalink / raw)
  To: Cai Huoqing
  Cc: Kieran Bingham, Mauro Carvalho Chehab, linux-media,
	linux-renesas-soc, linux-kernel

On 01/09/2021 06:55, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>  drivers/media/platform/rcar_fdp1.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/rcar_fdp1.c b/drivers/media/platform/rcar_fdp1.c
> index 89aac60066d9..19de3c19bcca 100644
> --- a/drivers/media/platform/rcar_fdp1.c
> +++ b/drivers/media/platform/rcar_fdp1.c
> @@ -2256,7 +2256,6 @@ static int fdp1_probe(struct platform_device *pdev)
>  	struct fdp1_dev *fdp1;
>  	struct video_device *vfd;
>  	struct device_node *fcp_node;
> -	struct resource *res;
>  	struct clk *clk;
>  	unsigned int i;
>  
> @@ -2283,8 +2282,7 @@ static int fdp1_probe(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, fdp1);
>  
>  	/* Memory-mapped registers */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	fdp1->regs = devm_ioremap_resource(&pdev->dev, res);
> +	fdp1->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(fdp1->regs))
>  		return PTR_ERR(fdp1->regs);
>  
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-01  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01  5:55 [PATCH] media: rcar_fdp1: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-01  8:16 ` Kieran Bingham

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).