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 3/3] net: phy: remove modalias-based mdio bus matching
Date: Sat, 31 Jan 2026 18:40:00 +0100 [thread overview]
Message-ID: <ce1c6df0-4785-4b28-8322-32dc6bceea18@gmail.com> (raw)
In-Reply-To: <d9543e7d-23e1-4dba-a6b3-35dcd6a35dec@gmail.com>
Last user dsa_loop has been migrated away from modalias-based matching,
so we can remove this feature now. It was the only user of MDIO_NAME_SIZE,
so remove also this constant.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/mdio_device.c | 13 -------------
include/linux/mdio.h | 1 -
include/linux/mod_devicetable.h | 1 -
3 files changed, 15 deletions(-)
diff --git a/drivers/net/phy/mdio_device.c b/drivers/net/phy/mdio_device.c
index 6e90ed42cd9..65636070a22 100644
--- a/drivers/net/phy/mdio_device.c
+++ b/drivers/net/phy/mdio_device.c
@@ -36,18 +36,6 @@ static void mdio_device_release(struct device *dev)
kfree(to_mdio_device(dev));
}
-static int mdio_device_bus_match(struct device *dev,
- const struct device_driver *drv)
-{
- struct mdio_device *mdiodev = to_mdio_device(dev);
- const struct mdio_driver *mdiodrv = to_mdio_driver(drv);
-
- if (mdiodrv->mdiodrv.flags & MDIO_DEVICE_IS_PHY)
- return 0;
-
- return strcmp(mdiodev->modalias, drv->name) == 0;
-}
-
struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr)
{
struct mdio_device *mdiodev;
@@ -60,7 +48,6 @@ struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr)
mdiodev->dev.release = mdio_device_release;
mdiodev->dev.parent = &bus->dev;
mdiodev->dev.bus = &mdio_bus_type;
- mdiodev->bus_match = mdio_device_bus_match;
mdiodev->device_free = mdio_device_free;
mdiodev->device_remove = mdio_device_remove;
mdiodev->bus = bus;
diff --git a/include/linux/mdio.h b/include/linux/mdio.h
index 42d6d47e445..7ad7ce48f53 100644
--- a/include/linux/mdio.h
+++ b/include/linux/mdio.h
@@ -29,7 +29,6 @@ struct mdio_device {
struct device dev;
struct mii_bus *bus;
- char modalias[MDIO_NAME_SIZE];
int (*bus_match)(struct device *dev, const struct device_driver *drv);
void (*device_free)(struct mdio_device *mdiodev);
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 24eb5a88a5c..5b1725fe970 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -609,7 +609,6 @@ struct platform_device_id {
kernel_ulong_t driver_data;
};
-#define MDIO_NAME_SIZE 32
#define MDIO_MODULE_PREFIX "mdio:"
#define MDIO_ID_FMT "%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u"
--
2.52.0
next prev parent reply other threads:[~2026-01-31 17:40 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 ` [PATCH net-next 2/3] net: dsa: loop: remove MDIO device modalias Heiner Kallweit
2026-02-02 12:36 ` Vladimir Oltean
2026-01-31 17:40 ` Heiner Kallweit [this message]
2026-02-03 12:11 ` [PATCH net-next 0/3] net: phy: remove modalias-based MDIO device bus matching 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=ce1c6df0-4785-4b28-8322-32dc6bceea18@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