All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: rcar_jpu: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-01  5:55 Cai Huoqing
  2021-09-02 10:54 ` Kieran Bingham
  0 siblings, 1 reply; 2+ messages in thread
From: Cai Huoqing @ 2021-09-01  5:55 UTC (permalink / raw)
  To: caihuoqing
  Cc: Mikhail Ulyanov, Mauro Carvalho Chehab, linux-media, 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_jpu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c
index f57158bf2b11..56bb464629ed 100644
--- a/drivers/media/platform/rcar_jpu.c
+++ b/drivers/media/platform/rcar_jpu.c
@@ -1590,7 +1590,6 @@ MODULE_DEVICE_TABLE(of, jpu_dt_ids);
 static int jpu_probe(struct platform_device *pdev)
 {
 	struct jpu *jpu;
-	struct resource *res;
 	int ret;
 	unsigned int i;
 
@@ -1603,8 +1602,7 @@ static int jpu_probe(struct platform_device *pdev)
 	jpu->dev = &pdev->dev;
 
 	/* memory-mapped registers */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	jpu->regs = devm_ioremap_resource(&pdev->dev, res);
+	jpu->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(jpu->regs))
 		return PTR_ERR(jpu->regs);
 
-- 
2.25.1


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

* Re: [PATCH] media: rcar_jpu: Make use of the helper function devm_platform_ioremap_resource()
  2021-09-01  5:55 [PATCH] media: rcar_jpu: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
@ 2021-09-02 10:54 ` Kieran Bingham
  0 siblings, 0 replies; 2+ messages in thread
From: Kieran Bingham @ 2021-09-02 10:54 UTC (permalink / raw)
  To: Cai Huoqing
  Cc: Mikhail Ulyanov, Mauro Carvalho Chehab, linux-media,
	linux-kernel, Linux-Renesas

+Cc linux-renesas-soc

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
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>

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


> ---
>  drivers/media/platform/rcar_jpu.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c
> index f57158bf2b11..56bb464629ed 100644
> --- a/drivers/media/platform/rcar_jpu.c
> +++ b/drivers/media/platform/rcar_jpu.c
> @@ -1590,7 +1590,6 @@ MODULE_DEVICE_TABLE(of, jpu_dt_ids);
>  static int jpu_probe(struct platform_device *pdev)
>  {
>  	struct jpu *jpu;
> -	struct resource *res;
>  	int ret;
>  	unsigned int i;
>  
> @@ -1603,8 +1602,7 @@ static int jpu_probe(struct platform_device *pdev)
>  	jpu->dev = &pdev->dev;
>  
>  	/* memory-mapped registers */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	jpu->regs = devm_ioremap_resource(&pdev->dev, res);
> +	jpu->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(jpu->regs))
>  		return PTR_ERR(jpu->regs);
>  
> 


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

end of thread, other threads:[~2021-09-02 10:54 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_jpu: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-02 10:54 ` Kieran Bingham

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.