Commit d9a88c7c authored by Yangtao Li's avatar Yangtao Li Committed by Hans Verkuil

media: marvell: Use devm_platform_get_and_ioremap_resource()

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: default avatarYangtao Li <frank.li@vivo.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent f3e76caa
...@@ -223,8 +223,7 @@ static int mmpcam_probe(struct platform_device *pdev) ...@@ -223,8 +223,7 @@ static int mmpcam_probe(struct platform_device *pdev)
/* /*
* Get our I/O memory. * Get our I/O memory.
*/ */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); mcam->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
mcam->regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(mcam->regs)) if (IS_ERR(mcam->regs))
return PTR_ERR(mcam->regs); return PTR_ERR(mcam->regs);
mcam->regs_size = resource_size(res); mcam->regs_size = resource_size(res);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment