]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: phy: remove modalias-based mdio bus matching
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 31 Jan 2026 17:40:00 +0000 (18:40 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 3 Feb 2026 11:46:55 +0000 (12:46 +0100)
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>
Link: https://patch.msgid.link/ce1c6df0-4785-4b28-8322-32dc6bceea18@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/mdio_device.c
include/linux/mdio.h
include/linux/mod_devicetable.h

index 6e90ed42cd98febfe6d2095d334e000b06dfc450..65636070a2228b98b395f7c9143f710a6c50ffc8 100644 (file)
@@ -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;
index 42d6d47e445b75e6d28c6c5896de6e6537b5cc7d..7ad7ce48f5313d7d9b681676e90b7efdf9e701c7 100644 (file)
@@ -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);
index 24eb5a88a5c580253fd58c2f841eb48ea455b34e..5b1725fe97076e97af0441540d111782332c9876 100644 (file)
@@ -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"