Commit 5f328fb5 authored by Cai Huoqing's avatar Cai Huoqing Committed by Mauro Carvalho Chehab

media: imx-pxp: 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>
Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent a498a4e7
...@@ -1636,7 +1636,6 @@ static int pxp_soft_reset(struct pxp_dev *dev) ...@@ -1636,7 +1636,6 @@ static int pxp_soft_reset(struct pxp_dev *dev)
static int pxp_probe(struct platform_device *pdev) static int pxp_probe(struct platform_device *pdev)
{ {
struct pxp_dev *dev; struct pxp_dev *dev;
struct resource *res;
struct video_device *vfd; struct video_device *vfd;
int irq; int irq;
int ret; int ret;
...@@ -1652,8 +1651,7 @@ static int pxp_probe(struct platform_device *pdev) ...@@ -1652,8 +1651,7 @@ static int pxp_probe(struct platform_device *pdev)
return ret; return ret;
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); dev->mmio = devm_platform_ioremap_resource(pdev, 0);
dev->mmio = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(dev->mmio)) if (IS_ERR(dev->mmio))
return PTR_ERR(dev->mmio); return PTR_ERR(dev->mmio);
......
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