[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220331092533.348626-12-clement.leger@bootlin.com>
Date: Thu, 31 Mar 2022 11:25:33 +0200
From: Clément Léger <clement.leger@...tlin.com>
To: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: Horatiu Vultur <horatiu.vultur@...rochip.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Allan Nielsen <allan.nielsen@...rochip.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Clément Léger <clement.leger@...tlin.com>
Subject: [RFC PATCH net-next v2 11/11] net: mdio: mscc-miim: use fwnode_mdiobus_register()
Use fwnode_mdiobus_register() to be compatible with devices described
with device-tree and software nodes.
Signed-off-by: Clément Léger <clement.leger@...tlin.com>
---
drivers/net/mdio/mdio-mscc-miim.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mdio/mdio-mscc-miim.c b/drivers/net/mdio/mdio-mscc-miim.c
index c483ba67c21f..ea79421fcfd4 100644
--- a/drivers/net/mdio/mdio-mscc-miim.c
+++ b/drivers/net/mdio/mdio-mscc-miim.c
@@ -7,12 +7,12 @@
*/
#include <linux/bitops.h>
+#include <linux/fwnode_mdio.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/mdio/mdio-mscc-miim.h>
#include <linux/module.h>
-#include <linux/of_mdio.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/property.h>
@@ -288,7 +288,7 @@ static int mscc_miim_probe(struct platform_device *pdev)
if (!miim->info)
return -EINVAL;
- ret = of_mdiobus_register(bus, pdev->dev.of_node);
+ ret = fwnode_mdiobus_register(bus, dev_fwnode(&pdev->dev));
if (ret < 0) {
dev_err(&pdev->dev, "Cannot register MDIO bus (%d)\n", ret);
return ret;
--
2.34.1
Powered by blists - more mailing lists