Commit e0bee542 authored by Cai Huoqing's avatar Cai Huoqing Committed by Mauro Carvalho Chehab
Browse files

media: xilinx: Make use of the helper function devm_platform_ioremap_resource()



Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent a24973a6
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -205,10 +205,8 @@ EXPORT_SYMBOL_GPL(xvip_clr_and_set);
int xvip_init_resources(struct xvip_device *xvip)
{
	struct platform_device *pdev = to_platform_device(xvip->dev);
	struct resource *res;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	xvip->iomem = devm_ioremap_resource(xvip->dev, res);
	xvip->iomem = devm_platform_ioremap_resource(pdev, 0);
	if (IS_ERR(xvip->iomem))
		return PTR_ERR(xvip->iomem);