Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: phy: remove modalias-based mdio bus matching

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>

authored by

Heiner Kallweit and committed by
Paolo Abeni
3051419f 5fddafbb

-15
-13
drivers/net/phy/mdio_device.c
··· 36 36 kfree(to_mdio_device(dev)); 37 37 } 38 38 39 - static int mdio_device_bus_match(struct device *dev, 40 - const struct device_driver *drv) 41 - { 42 - struct mdio_device *mdiodev = to_mdio_device(dev); 43 - const struct mdio_driver *mdiodrv = to_mdio_driver(drv); 44 - 45 - if (mdiodrv->mdiodrv.flags & MDIO_DEVICE_IS_PHY) 46 - return 0; 47 - 48 - return strcmp(mdiodev->modalias, drv->name) == 0; 49 - } 50 - 51 39 struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr) 52 40 { 53 41 struct mdio_device *mdiodev; ··· 48 60 mdiodev->dev.release = mdio_device_release; 49 61 mdiodev->dev.parent = &bus->dev; 50 62 mdiodev->dev.bus = &mdio_bus_type; 51 - mdiodev->bus_match = mdio_device_bus_match; 52 63 mdiodev->device_free = mdio_device_free; 53 64 mdiodev->device_remove = mdio_device_remove; 54 65 mdiodev->bus = bus;
-1
include/linux/mdio.h
··· 29 29 struct device dev; 30 30 31 31 struct mii_bus *bus; 32 - char modalias[MDIO_NAME_SIZE]; 33 32 34 33 int (*bus_match)(struct device *dev, const struct device_driver *drv); 35 34 void (*device_free)(struct mdio_device *mdiodev);
-1
include/linux/mod_devicetable.h
··· 609 609 kernel_ulong_t driver_data; 610 610 }; 611 611 612 - #define MDIO_NAME_SIZE 32 613 612 #define MDIO_MODULE_PREFIX "mdio:" 614 613 615 614 #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"