[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230706101100.75654-3-frank.li@vivo.com>
Date: Thu, 6 Jul 2023 18:10:51 +0800
From: Yangtao Li <frank.li@...o.com>
To: 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 03/11] media: marvell: 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/marvell/mmp-driver.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/platform/marvell/mmp-driver.c b/drivers/media/platform/marvell/mmp-driver.c
index e93feefb447b..1e9ad79e53e7 100644
--- a/drivers/media/platform/marvell/mmp-driver.c
+++ b/drivers/media/platform/marvell/mmp-driver.c
@@ -223,8 +223,7 @@ static int mmpcam_probe(struct platform_device *pdev)
/*
* Get our I/O memory.
*/
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mcam->regs = devm_ioremap_resource(&pdev->dev, res);
+ mcam->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(mcam->regs))
return PTR_ERR(mcam->regs);
mcam->regs_size = resource_size(res);
--
2.39.0
Powered by blists - more mailing lists