From b8cf18bc4eadf4522b4937b3185dfa331d039e70 Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Thu, 6 Jul 2023 18:10:57 +0800 Subject: [PATCH] media: platform: ti: 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: Yangtao Li Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil [hverkuil: retained the line wrap] --- drivers/media/platform/ti/omap3isp/isp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platform/ti/omap3isp/isp.c index f3aaa9e..2f9c7d6 100644 --- a/drivers/media/platform/ti/omap3isp/isp.c +++ b/drivers/media/platform/ti/omap3isp/isp.c @@ -2329,9 +2329,8 @@ static int isp_probe(struct platform_device *pdev) for (i = 0; i < 2; i++) { unsigned int map_idx = i ? OMAP3_ISP_IOMEM_CSI2A_REGS1 : 0; - mem = platform_get_resource(pdev, IORESOURCE_MEM, i); isp->mmio_base[map_idx] = - devm_ioremap_resource(isp->dev, mem); + devm_platform_get_and_ioremap_resource(pdev, i, &mem); if (IS_ERR(isp->mmio_base[map_idx])) { ret = PTR_ERR(isp->mmio_base[map_idx]); goto error; -- 2.7.4