From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>, Andrew Lunn <andrew+netdev@lunn.ch>,
Russell King - ARM Linux <linux@armlinux.org.uk>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
David Miller <davem@davemloft.net>,
Simon Horman <horms@kernel.org>,
Michael Hennerich <michael.hennerich@analog.com>,
Alexandru Tachici <alexandru.tachici@analog.com>,
Vladimir Oltean <olteanv@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next 2/3] net: dsa: loop: remove MDIO device modalias
Date: Sat, 31 Jan 2026 18:38:56 +0100 [thread overview]
Message-ID: <15a4318f-50b5-4df5-874e-e387ee070a9d@gmail.com> (raw)
In-Reply-To: <d9543e7d-23e1-4dba-a6b3-35dcd6a35dec@gmail.com>
This change is a prerequisite for removing the MDIO device modalias,
as dsa_loop is the only user. Switch from modalias to a custom
bus match function.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/dsa/dsa_loop.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c
index 4a416f2717b..b41254b3ac4 100644
--- a/drivers/net/dsa/dsa_loop.c
+++ b/drivers/net/dsa/dsa_loop.c
@@ -395,6 +395,12 @@ static struct mdio_driver dsa_loop_drv = {
.shutdown = dsa_loop_drv_shutdown,
};
+static int dsa_loop_bus_match(struct device *dev,
+ const struct device_driver *drv)
+{
+ return drv == &dsa_loop_drv.mdiodrv.driver;
+}
+
static void dsa_loop_phydevs_unregister(void)
{
for (int i = 0; i < NUM_FIXED_PHYS; i++) {
@@ -428,7 +434,7 @@ static int __init dsa_loop_create_switch_mdiodev(void)
if (IS_ERR(switch_mdiodev))
goto out;
- strscpy(switch_mdiodev->modalias, "dsa-loop");
+ switch_mdiodev->bus_match = dsa_loop_bus_match;
switch_mdiodev->dev.platform_data = &dsa_loop_pdata;
ret = mdio_device_register(switch_mdiodev);
--
2.52.0
next prev parent reply other threads:[~2026-01-31 17:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-31 17:36 [PATCH net-next 0/3] net: phy: remove modalias-based MDIO device bus matching Heiner Kallweit
2026-01-31 17:37 ` [PATCH net-next 1/3] net: ethernet: adi: make name member of struct adin1110_cfg a pointer Heiner Kallweit
2026-01-31 17:38 ` Heiner Kallweit [this message]
2026-02-02 12:36 ` [PATCH net-next 2/3] net: dsa: loop: remove MDIO device modalias Vladimir Oltean
2026-01-31 17:40 ` [PATCH net-next 3/3] net: phy: remove modalias-based mdio bus matching Heiner Kallweit
2026-02-03 12:11 ` [PATCH net-next 0/3] net: phy: remove modalias-based MDIO device " patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15a4318f-50b5-4df5-874e-e387ee070a9d@gmail.com \
--to=hkallweit1@gmail.com \
--cc=alexandru.tachici@analog.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michael.hennerich@analog.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox