From d9a88c7ca5ceacb30cfb010efa9f3bb1253ae24e Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Thu, 6 Jul 2023 18:10:51 +0800 Subject: [PATCH] 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 Signed-off-by: Hans Verkuil --- 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 c83d9994c3b8..862583e9f40d 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.34.1