Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: rc: meson-ir: 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>
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>

authored by

Cai Huoqing and committed by
Mauro Carvalho Chehab
c533dabe 89041852

+1 -3
+1 -3
drivers/media/rc/meson-ir.c
··· 102 102 { 103 103 struct device *dev = &pdev->dev; 104 104 struct device_node *node = dev->of_node; 105 - struct resource *res; 106 105 const char *map_name; 107 106 struct meson_ir *ir; 108 107 int irq, ret; ··· 110 111 if (!ir) 111 112 return -ENOMEM; 112 113 113 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 114 - ir->reg = devm_ioremap_resource(dev, res); 114 + ir->reg = devm_platform_ioremap_resource(pdev, 0); 115 115 if (IS_ERR(ir->reg)) 116 116 return PTR_ERR(ir->reg); 117 117