[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241015200222.12452-5-rosenp@gmail.com>
Date: Tue, 15 Oct 2024 13:02:18 -0700
From: Rosen Penev <rosenp@...il.com>
To: netdev@...r.kernel.org
Cc: Florian Fainelli <florian.fainelli@...adcom.com>,
Andrew Lunn <andrew@...n.ch>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Woojung Huh <woojung.huh@...rochip.com>,
UNGLinuxDriver@...rochip.com (maintainer:MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER),
Clément Léger <clement.leger@...tlin.com>,
George McCollister <george.mccollister@...il.com>,
Richard Cochran <richardcochran@...il.com>,
Rosen Penev <rosenp@...il.com>,
Simon Horman <horms@...nel.org>,
Jacob Keller <jacob.e.keller@...el.com>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
Breno Leitao <leitao@...ian.org>,
linux-kernel@...r.kernel.org (open list),
linux-renesas-soc@...r.kernel.org (open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER)
Subject: [PATCHv7 net-next 3/6] net: ibm: emac: use devm_platform_ioremap_resource
No need to have a struct resource. Gets rid of the TODO.
Signed-off-by: Rosen Penev <rosenp@...il.com>
Reviewed-by: Simon Horman <horms@...nel.org>
---
drivers/net/ethernet/ibm/emac/core.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index 644abd37cfb4..438b08e8e956 100644
--- a/drivers/net/ethernet/ibm/emac/core.c
+++ b/drivers/net/ethernet/ibm/emac/core.c
@@ -3050,12 +3050,10 @@ static int emac_probe(struct platform_device *ofdev)
ndev->irq = dev->emac_irq;
- /* Map EMAC regs */
- // TODO : platform_get_resource() and devm_ioremap_resource()
- dev->emacp = devm_of_iomap(&ofdev->dev, np, 0, NULL);
- if (!dev->emacp) {
+ dev->emacp = devm_platform_ioremap_resource(ofdev, 0);
+ if (IS_ERR(dev->emacp)) {
dev_err(&ofdev->dev, "can't map device registers");
- err = -ENOMEM;
+ err = PTR_ERR(dev->emacp);
goto err_gone;
}
--
2.47.0
Powered by blists - more mailing lists