summaryrefslogtreecommitdiff
path: root/drivers/media/platform/st
diff options
context:
space:
mode:
authorYe Xingchen <ye.xingchen@zte.com.cn>2023-02-08 12:01:06 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-03-20 00:53:24 +0300
commit35dac920f721ccfed1116e807b90d8971db3d457 (patch)
treee4f498a7d3fc5ac6aebeecafc99841feb79292c2 /drivers/media/platform/st
parent2b64bcb76ac525d712116cd5d0dbb4c663cad63c (diff)
downloadlinux-35dac920f721ccfed1116e807b90d8971db3d457.tar.xz
media: platform: stm32: 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: Ye Xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform/st')
-rw-r--r--drivers/media/platform/st/stm32/dma2d/dma2d.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/platform/st/stm32/dma2d/dma2d.c b/drivers/media/platform/st/stm32/dma2d/dma2d.c
index 9706aa41b5d2..8e92efb842bf 100644
--- a/drivers/media/platform/st/stm32/dma2d/dma2d.c
+++ b/drivers/media/platform/st/stm32/dma2d/dma2d.c
@@ -603,7 +603,6 @@ static int dma2d_probe(struct platform_device *pdev)
{
struct dma2d_dev *dev;
struct video_device *vfd;
- struct resource *res;
int ret = 0;
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
@@ -614,9 +613,7 @@ static int dma2d_probe(struct platform_device *pdev)
mutex_init(&dev->mutex);
atomic_set(&dev->num_inst, 0);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
- dev->regs = devm_ioremap_resource(&pdev->dev, res);
+ dev->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(dev->regs))
return PTR_ERR(dev->regs);