can: m_can: use devm_platform_ioremap_resource_byname
Subsystems (4)
PATCH 1/1 can: m_can: use devm_platform_ioremap_resource_byname
Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately.
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/net/can/m_can/m_can_platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/can/m_can/m_can_platform.c +1 -2
@@ -80,8 +80,7 @@ static int m_can_plat_probe(struct platform_device *pdev)if (ret) goto probe_fail; - res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"m_can" ); - addr =devm_ioremap_resource (&pdev->dev, res); + addr =devm_platform_ioremap_resource_byname (pdev,"m_can" ); irq =platform_get_irq_byname (pdev,"int0" );if (IS_ERR (addr) || irq <0 ) { ret = -EINVAL ;
Signature · 1 line
2.25.1
Marc Kleine-Budde
maintainerQuoted 5 lines · Yang Yingliang
Use the
devm_platform_ioremap_resource_byname()helper instead of callingplatform_get_resource_byname()anddevm_ioremap_resource()separately.Signed-off-by Yang Yingliang <[email protected]>
Applied to linux-can-next/testing.
Tnx,
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 |