All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/v3d: Make use of the helper function devm_platform_ioremap_resource_byname()
@ 2021-09-01 11:29 Cai Huoqing
  2021-09-20  8:31 ` Melissa Wen
  0 siblings, 1 reply; 3+ messages in thread
From: Cai Huoqing @ 2021-09-01 11:29 UTC (permalink / raw)
  To: caihuoqing
  Cc: Emma Anholt, David Airlie, Daniel Vetter, dri-devel, linux-kernel

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/gpu/drm/v3d/v3d_drv.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
index 9403c3b36aca..c1deab2cf38d 100644
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -206,10 +206,7 @@ MODULE_DEVICE_TABLE(of, v3d_of_match);
 static int
 map_regs(struct v3d_dev *v3d, void __iomem **regs, const char *name)
 {
-	struct resource *res =
-		platform_get_resource_byname(v3d_to_pdev(v3d), IORESOURCE_MEM, name);
-
-	*regs = devm_ioremap_resource(v3d->drm.dev, res);
+	*regs = devm_platform_ioremap_resource_byname(v3d_to_pdev(v3d), name);
 	return PTR_ERR_OR_ZERO(*regs);
 }
 
-- 
2.25.1


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

* Re: [PATCH] drm/v3d: Make use of the helper function devm_platform_ioremap_resource_byname()
  2021-09-01 11:29 [PATCH] drm/v3d: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
@ 2021-09-20  8:31 ` Melissa Wen
  2021-09-22  8:11   ` Melissa Wen
  0 siblings, 1 reply; 3+ messages in thread
From: Melissa Wen @ 2021-09-20  8:31 UTC (permalink / raw)
  To: Cai Huoqing
  Cc: Emma Anholt, David Airlie, Daniel Vetter, dri-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

On 09/01, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource_byname() helper instead of
> calling platform_get_resource_byname() and devm_ioremap_resource()
> separately
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>  drivers/gpu/drm/v3d/v3d_drv.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
> index 9403c3b36aca..c1deab2cf38d 100644
> --- a/drivers/gpu/drm/v3d/v3d_drv.c
> +++ b/drivers/gpu/drm/v3d/v3d_drv.c
> @@ -206,10 +206,7 @@ MODULE_DEVICE_TABLE(of, v3d_of_match);
>  static int
>  map_regs(struct v3d_dev *v3d, void __iomem **regs, const char *name)
>  {
> -	struct resource *res =
> -		platform_get_resource_byname(v3d_to_pdev(v3d), IORESOURCE_MEM, name);
> -
> -	*regs = devm_ioremap_resource(v3d->drm.dev, res);
> +	*regs = devm_platform_ioremap_resource_byname(v3d_to_pdev(v3d), name);
>  	return PTR_ERR_OR_ZERO(*regs);
>  }
lgtm.

Reviewed-by: Melissa Wen <mwen@igalia.com>
>  
> -- 
> 2.25.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] drm/v3d: Make use of the helper function devm_platform_ioremap_resource_byname()
  2021-09-20  8:31 ` Melissa Wen
@ 2021-09-22  8:11   ` Melissa Wen
  0 siblings, 0 replies; 3+ messages in thread
From: Melissa Wen @ 2021-09-22  8:11 UTC (permalink / raw)
  To: Melissa Wen
  Cc: Cai Huoqing, Emma Anholt, David Airlie, Daniel Vetter, dri-devel,
	linux-kernel

On 09/20, Melissa Wen wrote:
> On 09/01, Cai Huoqing wrote:
> > Use the devm_platform_ioremap_resource_byname() helper instead of
> > calling platform_get_resource_byname() and devm_ioremap_resource()
> > separately
> > 
> > Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> > ---
> >  drivers/gpu/drm/v3d/v3d_drv.c | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
> > index 9403c3b36aca..c1deab2cf38d 100644
> > --- a/drivers/gpu/drm/v3d/v3d_drv.c
> > +++ b/drivers/gpu/drm/v3d/v3d_drv.c
> > @@ -206,10 +206,7 @@ MODULE_DEVICE_TABLE(of, v3d_of_match);
> >  static int
> >  map_regs(struct v3d_dev *v3d, void __iomem **regs, const char *name)
> >  {
> > -	struct resource *res =
> > -		platform_get_resource_byname(v3d_to_pdev(v3d), IORESOURCE_MEM, name);
> > -
> > -	*regs = devm_ioremap_resource(v3d->drm.dev, res);
> > +	*regs = devm_platform_ioremap_resource_byname(v3d_to_pdev(v3d), name);
> >  	return PTR_ERR_OR_ZERO(*regs);
> >  }
> lgtm.
> 
> Reviewed-by: Melissa Wen <mwen@igalia.com>

and applied to drm-misc-next.

Thanks,

Melissa
> >  
> > -- 
> > 2.25.1
> > 



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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01 11:29 [PATCH] drm/v3d: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
2021-09-20  8:31 ` Melissa Wen
2021-09-22  8:11   ` Melissa Wen

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.