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

Configure Feed

Select the types of activity you want to include in your feed.

mfd: stm32-timers: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230706113939.1178-6-frank.li@vivo.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Yangtao Li and committed by
Lee Jones
4c0104bf 390a3549

+1 -2
+1 -2
drivers/mfd/stm32-timers.c
··· 226 226 if (!ddata) 227 227 return -ENOMEM; 228 228 229 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 230 - mmio = devm_ioremap_resource(dev, res); 229 + mmio = devm_platform_get_and_ioremap_resource(pdev, 0, &res); 231 230 if (IS_ERR(mmio)) 232 231 return PTR_ERR(mmio); 233 232