aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-01 19:44:59 +0800
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-09-03 10:03:44 +0200
commitd9662001a1567adec59ffa34e4b67051262aa852 (patch)
tree91325a4e1ba486b97a2b16c8faa626e942929380
parent89e7da8a642d4b33dc8a49b58a1f6075906009f7 (diff)
media: rcar_drif: Make use of the helper function devm_platform_get_and_ioremap_resource()br-v5.16afor-v5.16a
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>
-rw-r--r--drivers/media/platform/rcar_drif.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/rcar_drif.c b/drivers/media/platform/rcar_drif.c
index a505d991548b..9a0982fa5c6b 100644
--- a/drivers/media/platform/rcar_drif.c
+++ b/drivers/media/platform/rcar_drif.c
@@ -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);

Privacy Policy