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

media: rc: sunxi-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>
Acked-by: Maxime Ripard <maxime@cerno.tech>
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
1c9b885c 044a3571

+1 -3
+1 -3
drivers/media/rc/sunxi-cir.c
··· 255 255 struct device *dev = &pdev->dev; 256 256 struct device_node *dn = dev->of_node; 257 257 const struct sunxi_ir_quirks *quirks; 258 - struct resource *res; 259 258 struct sunxi_ir *ir; 260 259 u32 b_clk_freq = SUNXI_IR_BASE_CLK; 261 260 ··· 300 301 dev_dbg(dev, "set base clock frequency to %d Hz.\n", b_clk_freq); 301 302 302 303 /* IO */ 303 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 304 - ir->base = devm_ioremap_resource(dev, res); 304 + ir->base = devm_platform_ioremap_resource(pdev, 0); 305 305 if (IS_ERR(ir->base)) { 306 306 return PTR_ERR(ir->base); 307 307 }