[PATCH net-next 07/10] net: phy: switch to using class_find_device_by_fwnode()
From: Dmitry Torokhov
Date: Sun Mar 22 2026 - 22:00:31 EST
In preparation to class_find_device_by_of_node() going away switch to
using class_find_device_by_fwnode().
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
drivers/net/phy/mdio_bus_provider.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/mdio_bus_provider.c b/drivers/net/phy/mdio_bus_provider.c
index 041576eba47a..ed3cd9a37c67 100644
--- a/drivers/net/phy/mdio_bus_provider.c
+++ b/drivers/net/phy/mdio_bus_provider.c
@@ -21,6 +21,7 @@
#include <linux/mii.h>
#include <linux/mm.h>
#include <linux/netdevice.h>
+#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_mdio.h>
#include <linux/phy.h>
@@ -754,7 +755,8 @@ struct mii_bus *of_mdio_find_bus(struct device_node *mdio_bus_np)
if (!mdio_bus_np)
return NULL;
- d = class_find_device_by_of_node(&mdio_bus_class, mdio_bus_np);
+ d = class_find_device_by_fwnode(&mdio_bus_class,
+ of_fwnode_handle(mdio_bus_np));
return d ? to_mii_bus(d) : NULL;
}
EXPORT_SYMBOL(of_mdio_find_bus);
--
2.53.0.959.g497ff81fa9-goog