can: c_can: use devm_platform_get_and_ioremap_resource()
Subsystems (3)
PATCH 1/1 can: c_can: use devm_platform_get_and_ioremap_resource()
From: Minghao Chi <[email protected]>
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.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi <[email protected]>
--- drivers/net/can/c_can/c_can_platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/can/c_can/c_can_platform.c +1 -2
@@ -290,8 +290,7 @@ static int c_can_plat_probe(struct platform_device *pdev) goto exit; } - mem =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - addr =devm_ioremap_resource (&pdev->dev, mem); + addr =devm_platform_get_and_ioremap_resource (pdev,0 , &mem);if (IS_ERR (addr)) { ret =PTR_ERR (addr); goto exit;
Signature · 1 line
2.25.1
Marc Kleine-Budde
maintainerQuoted 7 lines · On 11.11.2022 14:43:00, [email protected] wrote:
From: Minghao Chi <[email protected]>
Convertplatform_get_resource(),devm_ioremap_resource()to a single call todevm_platform_get_and_ioremap_resource(), as this is exactly what this function does.Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>
Added to linux-can-next.
Thanks,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |