video: exynos: Convert to devm_ioremap_resource()
Subsystems (2)
PATCH 1/1 video: exynos: Convert to devm_ioremap_resource()
The new devm_ioremap_resource() provides its own error messages. Patch found using coccinelle.
Signed-off-by Andrei Epure <[email protected]>
--- drivers/video/exynos/exynos_mipi_dsi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/video/exynos/exynos_mipi_dsi.c +3 -4
@@ -384,10 +384,9 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - dsim->reg_base =devm_request_and_ioremap (&pdev->dev, res); -if (!dsim->reg_base) { -dev_err (&pdev->dev,"failed to remap io region\n" ); - ret = -ENOMEM ; + dsim->reg_base =devm_ioremap_resource (&pdev->dev, res); +if (IS_ERR (dsim->reg_base)) { + ret =PTR_ERR (dsim->reg_base); goto error; }
Signature · 1 line
1.7.9.5
Hi,
Please refer to the following link.
http://marc.info/?l=linux-fbdev&m5963121130437&w=2
Best regard,
Donghwa Lee
Quoted 26 lines · Andrei Epure
The new
devm_ioremap_resource()provides its own error messages. Patch found using coccinelle.Signed-off-by Andrei Epure <[email protected]>--- drivers/video/exynos/exynos_mipi_dsi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)drivers/video/exynos/exynos_mipi_dsi.c +3
-4@@ -384,10 +384,9 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - dsim->reg_base =devm_request_and_ioremap (&pdev->dev, res); -if (!dsim->reg_base) { -dev_err (&pdev->dev,"failed to remap io region\n" ); - ret = -ENOMEM ; + dsim->reg_base =devm_ioremap_resource (&pdev->dev, res); +if (IS_ERR (dsim->reg_base)) { + ret =PTR_ERR (dsim->reg_base); goto error; }