All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] can: m_can: use devm_platform_ioremap_resource_byname
@ 2021-06-03  7:34 Yang Yingliang
  2021-06-16 10:39 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-06-03  7:34 UTC (permalink / raw)
  To: linux-kernel, netdev, linux-can; +Cc: mkl

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 <yangyingliang@huawei.com>
---
 drivers/net/can/m_can/m_can_platform.c | 3 +--
 1 file changed, 1 insertion(+), 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 599de0e08cd7..9f8f69aec993 100644
--- a/drivers/net/can/m_can/m_can_platform.c
+++ b/drivers/net/can/m_can/m_can_platform.c
@@ -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;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] can: m_can: use devm_platform_ioremap_resource_byname
  2021-06-03  7:34 [PATCH -next] can: m_can: use devm_platform_ioremap_resource_byname Yang Yingliang
@ 2021-06-16 10:39 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2021-06-16 10:39 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: linux-kernel, netdev, linux-can

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

On 03.06.2021 15:34:41, Yang Yingliang wrote:
> 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 <yangyingliang@huawei.com>

Applied to linux-can-next/testing.

Tnx,
Marc

-- 
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 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-16 10:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03  7:34 [PATCH -next] can: m_can: use devm_platform_ioremap_resource_byname Yang Yingliang
2021-06-16 10:39 ` Marc Kleine-Budde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.