[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230706101100.75654-9-frank.li@vivo.com>
Date: Thu, 6 Jul 2023 18:10:57 +0800
From: Yangtao Li <frank.li@...o.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: Yangtao Li <frank.li@...o.com>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 09/11] 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 <frank.li@...o.com>
---
drivers/media/platform/ti/omap3isp/isp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platform/ti/omap3isp/isp.c
index f3aaa9e76492..1c8e4ede29b6 100644
--- a/drivers/media/platform/ti/omap3isp/isp.c
+++ b/drivers/media/platform/ti/omap3isp/isp.c
@@ -2329,9 +2329,7 @@ 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);
+ isp->mmio_base[map_idx] = 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.39.0
Powered by blists - more mailing lists