[PATCH net-next v1 2/5] net: mvmdio: Switch to using fwnode_mdiobus_register()
From: Andy Shevchenko
Date: Mon May 04 2026 - 03:47:24 EST
Replace custom implementation of fwnode_mdiobus_register().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/net/ethernet/marvell/mvmdio.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index 3f4447e68888..62fbe22c01cb 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -18,16 +18,15 @@
*/
#include <linux/acpi.h>
-#include <linux/acpi_mdio.h>
#include <linux/clk.h>
#include <linux/delay.h>
+#include <linux/fwnode_mdio.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/of_mdio.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
@@ -379,13 +378,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
goto out_mdio;
}
- /* For the platforms not supporting DT/ACPI fall-back
- * to mdiobus_register via of_mdiobus_register.
- */
- if (is_acpi_node(pdev->dev.fwnode))
- ret = acpi_mdiobus_register(bus, pdev->dev.fwnode);
- else
- 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);
goto out_mdio;
--
2.50.1