Commit 6e6c74a4 authored by Yangtao Li's avatar Yangtao Li Committed by Laurent Pinchart

drm/renesas: Convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
parent f3651bc0
...@@ -1001,7 +1001,6 @@ static int rcar_mipi_dsi_get_clocks(struct rcar_mipi_dsi *dsi) ...@@ -1001,7 +1001,6 @@ static int rcar_mipi_dsi_get_clocks(struct rcar_mipi_dsi *dsi)
static int rcar_mipi_dsi_probe(struct platform_device *pdev) static int rcar_mipi_dsi_probe(struct platform_device *pdev)
{ {
struct rcar_mipi_dsi *dsi; struct rcar_mipi_dsi *dsi;
struct resource *mem;
int ret; int ret;
dsi = devm_kzalloc(&pdev->dev, sizeof(*dsi), GFP_KERNEL); dsi = devm_kzalloc(&pdev->dev, sizeof(*dsi), GFP_KERNEL);
...@@ -1018,8 +1017,7 @@ static int rcar_mipi_dsi_probe(struct platform_device *pdev) ...@@ -1018,8 +1017,7 @@ static int rcar_mipi_dsi_probe(struct platform_device *pdev)
return ret; return ret;
/* Acquire resources. */ /* Acquire resources. */
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); dsi->mmio = devm_platform_ioremap_resource(pdev, 0);
dsi->mmio = devm_ioremap_resource(dsi->dev, mem);
if (IS_ERR(dsi->mmio)) if (IS_ERR(dsi->mmio))
return PTR_ERR(dsi->mmio); return PTR_ERR(dsi->mmio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment