media: fimc-core: Convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
Yangtao Li 2023-07-06 18:10:58 +08:00 committed by Hans Verkuil
parent b8cf18bc4e
commit fd130042df

View File

@ -924,7 +924,6 @@ static int fimc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
u32 lclk_freq = 0;
struct fimc_dev *fimc;
struct resource *res;
int ret = 0;
int irq;
@ -961,8 +960,7 @@ static int fimc_probe(struct platform_device *pdev)
return PTR_ERR(fimc->sysreg);
}
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);