summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/mtk-cir.c
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-01 07:54:47 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-09-30 10:07:50 +0200
commitdfa974f586049bb81b7f4bbf3dcf4ce8aba1d45d (patch)
tree6144f83829d3e973db98f1822d720675cf49200b /drivers/media/rc/mtk-cir.c
parentmedia: rc: meson-ir: Make use of the helper function devm_platform_ioremap_re... (diff)
downloadlinux-dfa974f586049bb81b7f4bbf3dcf4ce8aba1d45d.tar.xz
linux-dfa974f586049bb81b7f4bbf3dcf4ce8aba1d45d.zip
media: rc: mtk-cir: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/rc/mtk-cir.c')
-rw-r--r--drivers/media/rc/mtk-cir.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/rc/mtk-cir.c b/drivers/media/rc/mtk-cir.c
index 65a136c0fac2..840e7aec5c21 100644
--- a/drivers/media/rc/mtk-cir.c
+++ b/drivers/media/rc/mtk-cir.c
@@ -292,7 +292,6 @@ static int mtk_ir_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *dn = dev->of_node;
- struct resource *res;
struct mtk_ir *ir;
u32 val;
int ret = 0;
@@ -320,8 +319,7 @@ static int mtk_ir_probe(struct platform_device *pdev)
ir->bus = ir->clk;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ir->base = devm_ioremap_resource(dev, res);
+ ir->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ir->base))
return PTR_ERR(ir->base);