media: rcar_drif: Make use of the helper function devm_platform_get_and_ioremap_resou...
authorCai Huoqing <caihuoqing@baidu.com>
Wed, 1 Sep 2021 11:44:59 +0000 (13:44 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Sep 2021 08:07:53 +0000 (10:07 +0200)
Use the devm_platform_get_and_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Acked-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/rcar_drif.c

index a505d99..9a0982f 100644 (file)
@@ -1395,8 +1395,7 @@ static int rcar_drif_probe(struct platform_device *pdev)
        }
 
        /* Register map */
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       ch->base = devm_ioremap_resource(&pdev->dev, res);
+       ch->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
        if (IS_ERR(ch->base))
                return PTR_ERR(ch->base);