diff options
author | zhaoxiao <long870912@gmail.com> | 2021-09-06 09:00:13 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-09-30 10:07:58 +0200 |
commit | 79b48af2126d4750ff3e5e4acba9fbe1e33870f5 (patch) | |
tree | 67c5e2b56068e225c810b8cf38991991c5d6cdce /drivers/staging/media/meson | |
parent | e4625044d656f3c33ece0cc9da22577bc10ca5d3 (diff) | |
download | linux-stable-79b48af2126d4750ff3e5e4acba9fbe1e33870f5.tar.gz linux-stable-79b48af2126d4750ff3e5e4acba9fbe1e33870f5.tar.bz2 linux-stable-79b48af2126d4750ff3e5e4acba9fbe1e33870f5.zip |
media: Media: meson: vdec: Use devm_platform_ioremap_resource_byname()
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.
Signed-off-by: zhaoxiao <long870912@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/meson')
-rw-r--r-- | drivers/staging/media/meson/vdec/vdec.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c index e51d69c4729d..8549d95be0f2 100644 --- a/drivers/staging/media/meson/vdec/vdec.c +++ b/drivers/staging/media/meson/vdec/vdec.c @@ -994,7 +994,6 @@ static int vdec_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct video_device *vdev; struct amvdec_core *core; - struct resource *r; const struct of_device_id *of_id; int irq; int ret; @@ -1006,13 +1005,11 @@ static int vdec_probe(struct platform_device *pdev) core->dev = dev; platform_set_drvdata(pdev, core); - r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dos"); - core->dos_base = devm_ioremap_resource(dev, r); + core->dos_base = devm_platform_ioremap_resource_byname(pdev, "dos"); if (IS_ERR(core->dos_base)) return PTR_ERR(core->dos_base); - r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "esparser"); - core->esparser_base = devm_ioremap_resource(dev, r); + core->esparser_base = devm_platform_ioremap_resource_byname(pdev, "esparser"); if (IS_ERR(core->esparser_base)) return PTR_ERR(core->esparser_base); |