OSDN Git Service

media: platform: renesas: use devm_platform_get_and_ioremap_resource()
authorYe Xingchen <ye.xingchen@zte.com.cn>
Wed, 8 Feb 2023 08:59:40 +0000 (09:59 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 19 Mar 2023 21:53:03 +0000 (22:53 +0100)
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/renesas/rcar-isp.c

index 10b3474..a3cfd21 100644 (file)
@@ -419,10 +419,7 @@ static const struct media_entity_operations risp_entity_ops = {
 static int risp_probe_resources(struct rcar_isp *isp,
                                struct platform_device *pdev)
 {
-       struct resource *res;
-
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       isp->base = devm_ioremap_resource(&pdev->dev, res);
+       isp->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
        if (IS_ERR(isp->base))
                return PTR_ERR(isp->base);