Skip to content

Commit

Permalink
media: rcar_drif: Make use of the helper function devm_platform_get_a…
Browse files Browse the repository at this point in the history
…nd_ioremap_resource()

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>
  • Loading branch information
Cai Huoqing authored and Mauro Carvalho Chehab committed Sep 30, 2021
1 parent e0bee54 commit 1b03b53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/platform/rcar_drif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1b03b53

Please sign in to comment.