Message ID | 20230707072034.48977-1-frank.li@vivo.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 6e6c74a4def2de26feea680311aa482a07839c2a |
Delegated to: | Kieran Bingham |
Headers | show |
Series | [01/18] drm/renesas: Convert to devm_platform_ioremap_resource() | expand |
Hi Yangtao, Thank you for the patch. On Fri, Jul 07, 2023 at 03:20:17PM +0800, Yangtao Li wrote: > Use devm_platform_ioremap_resource() to simplify code. > > Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > --- > drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c > index e10e4d4b89a2..4bf9f5d15fa8 100644 > --- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c > +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c > @@ -1002,7 +1002,6 @@ static int rcar_mipi_dsi_get_clocks(struct rcar_mipi_dsi *dsi) > static int rcar_mipi_dsi_probe(struct platform_device *pdev) > { > struct rcar_mipi_dsi *dsi; > - struct resource *mem; > int ret; > > dsi = devm_kzalloc(&pdev->dev, sizeof(*dsi), GFP_KERNEL); > @@ -1019,8 +1018,7 @@ static int rcar_mipi_dsi_probe(struct platform_device *pdev) > return ret; > > /* Acquire resources. */ > - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - dsi->mmio = devm_ioremap_resource(dsi->dev, mem); > + dsi->mmio = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(dsi->mmio)) > return PTR_ERR(dsi->mmio); >
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c index e10e4d4b89a2..4bf9f5d15fa8 100644 --- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c @@ -1002,7 +1002,6 @@ static int rcar_mipi_dsi_get_clocks(struct rcar_mipi_dsi *dsi) static int rcar_mipi_dsi_probe(struct platform_device *pdev) { struct rcar_mipi_dsi *dsi; - struct resource *mem; int ret; dsi = devm_kzalloc(&pdev->dev, sizeof(*dsi), GFP_KERNEL); @@ -1019,8 +1018,7 @@ static int rcar_mipi_dsi_probe(struct platform_device *pdev) return ret; /* Acquire resources. */ - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dsi->mmio = devm_ioremap_resource(dsi->dev, mem); + dsi->mmio = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dsi->mmio)) return PTR_ERR(dsi->mmio);
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> --- drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)