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

media: stm32-cec: 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>

authored by

Cai Huoqing and committed by
Mauro Carvalho Chehab
092c69b2 beabb243

+1 -3
+1 -3
drivers/media/cec/platform/stm32/stm32-cec.c
··· 255 255 static int stm32_cec_probe(struct platform_device *pdev) 256 256 { 257 257 u32 caps = CEC_CAP_DEFAULTS | CEC_CAP_PHYS_ADDR | CEC_MODE_MONITOR_ALL; 258 - struct resource *res; 259 258 struct stm32_cec *cec; 260 259 void __iomem *mmio; 261 260 int ret; ··· 265 266 266 267 cec->dev = &pdev->dev; 267 268 268 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 269 - mmio = devm_ioremap_resource(&pdev->dev, res); 269 + mmio = devm_platform_ioremap_resource(pdev, 0); 270 270 if (IS_ERR(mmio)) 271 271 return PTR_ERR(mmio); 272 272