Commit 5de4a619 authored by Yangtao Li's avatar Yangtao Li Committed by Hans Verkuil

media: fimc-lite: Convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 639a6fa4
......@@ -1450,7 +1450,6 @@ static int fimc_lite_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
const struct of_device_id *of_id;
struct fimc_lite *fimc;
struct resource *res;
int ret;
int irq;
......@@ -1479,8 +1478,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
spin_lock_init(&fimc->slock);
mutex_init(&fimc->lock);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
fimc->regs = devm_ioremap_resource(dev, res);
fimc->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(fimc->regs))
return PTR_ERR(fimc->regs);
......
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