diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-03 15:34:41 +0800 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2021-07-25 11:36:26 +0200 |
commit | 9808dba1bbcb8271bd1e7d66b43b555c926b8eb0 (patch) | |
tree | 74381b55e745f80deae2a9ea120c7e4e64801bda /drivers/net/can/m_can/m_can_platform.c | |
parent | d836cb5fe045463cdab15ad6f278f7c7c194228f (diff) | |
download | linux-9808dba1bbcb8271bd1e7d66b43b555c926b8eb0.tar.bz2 |
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.
Link: https://lore.kernel.org/r/20210603073441.2983497-1-yangyingliang@huawei.com
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/m_can/m_can_platform.c')
-rw-r--r-- | drivers/net/can/m_can/m_can_platform.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c index 8b5819cd4b80..a28c84aa8fa8 100644 --- a/drivers/net/can/m_can/m_can_platform.c +++ b/drivers/net/can/m_can/m_can_platform.c @@ -82,8 +82,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; |